Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uat 2 #216

Closed
wants to merge 2 commits into from
Closed

Uat 2 #216

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uat/codebuild/uat_linux_buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ phases:
- mvn -U -ntp verify -DskipTests=true
- mvn -U -ntp clean verify -f uat/pom.xml
- java -Dggc.archive=/tmp/greengrass-nucleus-latest.zip
-Dtags='LogManager&!unstable' -Dggc.install.root=$CODEBUILD_SRC_DIR -Dggc.log.level=INFO -Daws.region=us-west-2
-Dtags='MyTest&LogManager&!unstable' -Dggc.install.root=$CODEBUILD_SRC_DIR -Dggc.log.level=INFO -Daws.region=us-west-2
-jar uat/testing-features/target/greengrass-log-manager-testing-features.jar

artifacts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ private static List<String> generateRandomMessages(int n, int length) {
List<String> msgs = new ArrayList<>();
for (int i = 0; i < n; i++) {
// TODO: Improves this as this is not how the logger writes the logs
msgs.add(RANDOM_STRING_GENERATOR.generate(length));
String message = RANDOM_STRING_GENERATOR.generate(length);
msgs.add("{\"level\": \"INFO\", \"message\": \"" + message + "\"}");
}
return msgs;
}
Expand Down Expand Up @@ -168,4 +169,4 @@ public void verifyActiveFile(String componentName, String directoryAlias) {
List<File> sortedFileList = getComponentLogFiles(componentName, logsDirectory);
assertEquals(1, sortedFileList.size());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ Feature: Greengrass V2 LogManager
And I verify 100 logs for UserComponentX of type UserComponent have been uploaded to Cloudwatch within 120 seconds
And I verify the rotated files are deleted and that the active log file is present for component UserComponentX on directory UserComponentXLogDirectory

@MyTest
Scenario: LogManager-1-T3: As a customer I can configure the logs uploader to delete log oldest log files to keep the
disk space limit specified on the configuration
Given 10 temporary rotated log files for component UserComponentB have been created
Given 15 temporary rotated log files for component UserComponentB have been created
And 15 temporary rotated log files for component UserComponentC have been created
And 5 temporary rotated log files for component aws.greengrass.Nucleus have been created
And 5 temporary rotated log files for component UserComponentA have been created
Given I create a Greengrass deployment with components
Expand All @@ -166,7 +168,19 @@ Feature: Greengrass V2 LogManager
"logFileRegex": "UserComponentB_(.)+.log",
"logFileDirectoryPath": "${UserComponentBLogDirectory}",
"diskSpaceLimit":"100",
"diskSpaceLimitUnit":"KB"
"diskSpaceLimitUnit":"KB",
"minimumLogLevel": "WARN",
"uploadToCloudWatch": "true",
"deleteLogFileAfterCloudUpload": "false"
},
"UserComponentC": {
"logFileRegex": "UserComponentC_(.)+.log",
"logFileDirectoryPath": "${UserComponentCLogDirectory}",
"diskSpaceLimit":"100",
"diskSpaceLimitUnit":"KB",
"minimumLogLevel": "INFO",
"uploadToCloudWatch": "true",
"deleteLogFileAfterCloudUpload": "false"
}
},
"systemLogsConfiguration": {
Expand All @@ -177,15 +191,16 @@ Feature: Greengrass V2 LogManager
"deleteLogFileAfterCloudUpload": "true"
}
},
"periodicUploadIntervalSec": "500"
"periodicUploadIntervalSec": "0.1"
}
}
"""
And I deploy the Greengrass deployment configuration
Then the Greengrass deployment is COMPLETED on the device after 3 minutes
Then I verify the aws.greengrass.LogManager component is RUNNING using the greengrass-cli
And I wait 5 seconds
Then I verify that 10 log files for component UserComponentB are still available
Then I verify that 9 log files for component UserComponentB are still available
And I verify that 9 log files for component UserComponentC are still available

@network
Scenario: LogManager-1-T4: As a developer, logs uploader will handle network interruptions gracefully and upload logs from the last uploaded log after network resumes
Expand Down
Loading