Skip to content

Commit 96b581c

Browse files
authored
test(auth): Change the folder path for v2 auth tests (#2462)
1 parent 39a2a36 commit 96b581c

File tree

6 files changed

+4
-33
lines changed

6 files changed

+4
-33
lines changed

.github/workflows/integ_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
resource_subfolder: auth
7373
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
7474
aws_region: ${{ secrets.AWS_REGION }}
75-
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
75+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG_V2 }}
7676

7777
- name: Run Integration test
7878
uses: ./.github/composite_actions/run_xcodebuild_test

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/DeviceTests/AuthFetchDeviceTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class AuthFetchDeviceTests: AWSAuthBaseTest {
1414
var unsubscribeToken: UnsubscribeToken!
1515

1616
override func setUp() async throws {
17-
throw XCTSkip("Device Tracking is currently disabled. Remove once a new configuration is created for V2")
1817
try await super.setUp()
1918
AuthSessionHelper.clearSession()
2019
}

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/DeviceTests/AuthForgetDeviceTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class AuthForgetDeviceTests: AWSAuthBaseTest {
1414
var unsubscribeToken: UnsubscribeToken!
1515

1616
override func setUp() async throws {
17-
throw XCTSkip("Device Tracking is currently disabled. Remove once a new configuration is created for V2")
1817
try await super.setUp()
1918
AuthSessionHelper.clearSession()
2019
}

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/DeviceTests/AuthRememberDeviceTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class AuthRememberDeviceTests: AWSAuthBaseTest {
1414
var unsubscribeToken: UnsubscribeToken!
1515

1616
override func setUp() async throws {
17-
throw XCTSkip("Device Tracking is currently disabled. Remove once a new configuration is created for V2")
1817
try await super.setUp()
1918
AuthSessionHelper.clearSession()
2019
}

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/README.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ amplify add auth
2929
Do you want to add User Pool Groups?
3030
No
3131
Do you want to add an admin queries API?
32-
Yes
33-
? Do you want to restrict access to the admin queries API to a specific Group
3432
No
3533
Multifactor authentication (MFA) user login options:
3634
OFF
@@ -57,16 +55,14 @@ amplify add auth
5755
? Do you want to configure Lambda Triggers for Cognito?
5856
Yes
5957
? Which triggers do you want to enable for Cognito
60-
Custom Message
6158
Pre Sign-up
6259
[Choose as many that you would like to manually verify later]
63-
? What functionality do you want to use for Custom Message
64-
Create your own module
6560
? What functionality do you want to use for Pre Sign-up
6661
Create your own module
6762
Succesfully added the Lambda function locally
6863
? Do you want to edit your custom function now? Yes
6964
Please edit the file in your editor:
65+
7066
```
7167

7268
For Pre Sign-up lambda
@@ -77,15 +73,6 @@ exports.handler = (event) => {
7773
};
7874
```
7975

80-
For Custom Message and any other lambdas
81-
82-
```
83-
// you can simply set them to log the input so you can verify valid and correct validationData/clientMetadata
84-
exports.handler = (event) => {
85-
console.log("Reached custom message lambda");
86-
};
87-
```
88-
8976
Continue in the terminal;
9077

9178
```
@@ -97,18 +84,5 @@ amplify push
9784

9885
This will create a amplifyconfiguration.json file in your local, copy that file to `~/.aws-amplify/amplify-ios/testconfiguration/` and rename as `AWSCognitoAuthPluginIntegrationTests-amplifyconfiguration.json`.
9986

100-
Next create `AWSCognitoAuthPluginIntegrationTests-credentials.json` and add it to the same folder path, with the following values:
101-
102-
```
103-
{
104-
"test_email_1": [YOUR_EMAIL],
105-
"test_email_2": [ANOTHER_EMAIL]
106-
}
107-
```
108-
109-
The email should be a valid email you can use for testing, for example for making sure you receive a confirmation code when updating user's attributes with an email.
110-
111-
After running tests pass that in `metadata`, you can verify the corresponding lambdas have been trigger with payloads containing this data.
112-
11387
For Auth Device tests:
11488
Follow steps here (https://docs.amplify.aws/lib/auth/device_features/q/platform/ios/#configure-auth-category)[https://docs.amplify.aws/lib/auth/device_features/q/platform/ios/#configure-auth-category] and select "Always" for "Do you want to remember your user's devices?"

0 commit comments

Comments
 (0)