You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchLoggingPluginGen2IntegrationTests.xctestplan
Copy file name to clipboardExpand all lines: AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchLoggingPluginIntegrationTests.swift
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,11 @@ class AWSCloudWatchLoggingPluginIntergrationTests: XCTestCase {
Copy file name to clipboardExpand all lines: AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/README.md
@@ -10,9 +10,31 @@ The following steps demonstrate how to set up Logging. Auth category is also req
10
10
11
11
2. Copy `amplifyconfiguration.json` to a new file named `AWSCloudWatchLoggingPluginIntegrationTests-amplifyconfiguration.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
3. Configure the `amplifyconfiguration-logging.json` file (https://docs.amplify.aws/swift/build-a-backend/more-features/logging/set-up-logging/#initialize-amplify-logging)
14
18
15
-
4. Copy `amplifyconfiguration-logging.json` to a new file named `AWSCloudWatchLoggingPluginIntegrationTests-amplifyconfiguration-logging.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
19
+
```json
20
+
{
21
+
"awsCloudWatchLoggingPlugin": {
22
+
"enable": true,
23
+
"logGroupName": "<log-group-name>",
24
+
"region": "<region>",
25
+
"localStoreMaxSizeInMB": 1,
26
+
"flushIntervalInSeconds": 60,
27
+
"loggingConstraints": {
28
+
"defaultLogLevel": "VERBOSE"
29
+
}
30
+
}
31
+
}
32
+
```
33
+
4. Copy `amplifyconfiguration_logging.json` to a new file named `AWSCloudWatchLoggingPluginIntegrationTests-amplifyconfiguration_logging.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
10. Copy the `amplify_outputs.json`file over to the test directory as`AWSCloudWatchLoggingPluginIntegrationTests-amplify_outputs.json`. The tests will automatically pick this file up. Create the directories in this path first if it currently doesn't exist.
161
+
5. Copy `amplify_outputs.json` to a new file named`AWSCloudWatchLoggingPluginIntegrationTests-amplify_outputs.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
11. Configure the `amplifyconfiguration-logging.json` file (https://docs.amplify.aws/swift/build-a-backend/more-features/logging/set-up-logging/#initialize-amplify-logging)
167
+
6. Configure the `amplifyconfiguration_logging_gen2.json` file (https://docs.amplify.aws/swift/build-a-backend/add-aws-services/logging/set-up-logging/#initialize-amplify-logging)
168
+
169
+
```json
170
+
{
171
+
"awsCloudWatchLoggingPlugin": {
172
+
"enable": true,
173
+
"logGroupName": "<log-group-name>",
174
+
"region": "<region>",
175
+
"localStoreMaxSizeInMB": 1,
176
+
"flushIntervalInSeconds": 60,
177
+
"loggingConstraints": {
178
+
"defaultLogLevel": "VERBOSE"
179
+
}
180
+
}
181
+
}
182
+
```
183
+
184
+
7. Copy `amplifyconfiguration_logging_gen2.json` to a new file named `AWSCloudWatchLoggingPluginIntegrationTests-amplifyconfiguration_logging_gen2.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
12. Copy `amplifyconfiguration-logging.json` to a new file named `AWSCloudWatchLoggingPluginIntegrationTests-amplifyconfiguration-logging.json` inside `~/.aws-amplify/amplify-ios/testconfiguration/`.
190
+
### Deploying from a branch (Optional)
109
191
110
-
13. You can now run all of the integration tests.
192
+
If you want to be able utilize Git commits for deployments
193
+
194
+
1. Commit and push the files to a git repository.
195
+
196
+
2. Navigate to the AWS Amplify console (https://us-east-1.console.aws.amazon.com/amplify/home?region=us-east-1#/)
197
+
198
+
3. Click on "Try Amplify Gen 2" button.
199
+
200
+
4. Choose "Option 2: Start with an existing app", and choose Github, and press Next.
201
+
202
+
5. Find the repository and branch, and click Next
203
+
204
+
6. Click "Save and deploy" and wait for deployment to finish.
205
+
206
+
7. Generate the `amplify_outputs.json` configuration file
207
+
208
+
```
209
+
npx amplify generate outputs --branch main --app-id [APP_ID] --profile [AWS_PROFILE]
0 commit comments