Closed timmattison closed 5 years ago
Likely this doesn’t work because Docker gets the AWS credentials via the environment but doesn’t pass them to sub processes now.
Possible solutions:
Error message looks like this:
master: Pulling from timmattison/aws-greengrass-provisioner
Digest: sha256:07c377ef87195da655f90a686d4e2398af22d51e5f91ff288e9afb0ec8f24e8f
Status: Image is up to date for timmattison/aws-greengrass-provisioner:master
[INFO] BasicGroupTestHelper: Downloading Device Tester to [/tmp/devicetester336027927627193391zip] ...
[INFO] BasicGroupTestHelper: Extracting Device Tester to [/tmp/d7a8cb46-259a-4de7-ad7a-6e1813e151894481856563164363207] ...
[INFO] BasicGroupTestHelper: Download and extraction of Device Tester is complete
[INFO] BasicIoHelper: Connected to device under test
[INFO] BasicGroupTestHelper: Not cleaning or generating the config in /var/lib/GGQ
[INFO] BasicGroupTestHelper: Stopping Greengrass if it is running
[INFO] Starting test | ggc_user_group_check_test_1
Exception in thread "Thread-4" java.lang.RuntimeException: No match for log message [time="2019-04-08T13:36:39Z" level=error msg=aws credentials not found: EnvAccessKeyNotFound: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment executionId=5687202b-5a03-11e9-bb78-0242ac110002 suiteId=GGQ groupId=ggcdependencies testCaseId=ggc_user_group_check_test_1 deviceId=DUT]
at com.awslabs.aws.greengrass.provisioner.implementations.helpers.BasicDeviceTesterHelper.getLogMessageType(BasicDeviceTesterHelper.java:78)
at com.awslabs.aws.greengrass.provisioner.implementations.helpers.BasicDeviceTesterHelper.log(BasicDeviceTesterHelper.java:86)
at com.awslabs.aws.greengrass.provisioner.implementations.helpers.BasicGroupTestHelper.handleLogMessage(BasicGroupTestHelper.java:402)
at com.awslabs.aws.greengrass.provisioner.implementations.helpers.BasicGroupTestHelper.lambda$execute$2(BasicGroupTestHelper.java:257)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.awslabs.aws.greengrass.provisioner.implementations.helpers.BasicProcessHelper.lambda$innerGetOutputFromProcess$2(BasicProcessHelper.java:60)
at java.lang.Thread.run(Thread.java:748)
[INFO] BasicGroupTestHelper: Test duration: [PT2.352S]
[INFO] BasicGroupTestHelper: Tests executed:
[INFO] BasicGroupTestHelper: Tests passed:
[WARN] BasicGroupTestHelper: Tests failed:
Fixed in #74
Device Tester support doesn't work in Docker. Errors indicate missing credentials.