diff --git a/test-integration/IntegrationTests/IntegrationTestDiscovery.py b/test-integration/IntegrationTests/IntegrationTestDiscovery.py index 0209119..417ec3b 100644 --- a/test-integration/IntegrationTests/IntegrationTestDiscovery.py +++ b/test-integration/IntegrationTests/IntegrationTestDiscovery.py @@ -15,12 +15,12 @@ TIME_OUT_SEC = 30 # This is a pre-generated test data from DRS integration tests ID_PREFIX = "Id-" -GGC_ARN = "arn:aws:iot:us-east-1:180635532705:thing/CI_Greengrass_Discovery_Thing" +GGC_ARN = "arn:aws:iot:us-east-1:003261610643:thing/DRS_GGC_0kegiNGA_0" GGC_PORT_NUMBER_BASE = 8080 GGC_HOST_ADDRESS_PREFIX = "192.168.101." METADATA_PREFIX = "Description-" GROUP_ID = "627bf63d-ae64-4f58-a18c-80a44fcf4088" -THING_NAME = "CI_Greengrass_Discovery_Thing" +THING_NAME = "DRS_GGAD_0kegiNGA_0" EXPECTED_CA_CONTENT = "-----BEGIN CERTIFICATE-----\n" \ "MIIEFTCCAv2gAwIBAgIVAPZfc4GMLZPmXbnoaZm6jRDqDs4+MA0GCSqGSIb3DQEB\n" \ "CwUAMIGoMQswCQYDVQQGEwJVUzEYMBYGA1UECgwPQW1hem9uLmNvbSBJbmMuMRww\n" \ @@ -155,8 +155,9 @@ def _verify_ca_list(ca_list): def verify_all_cores(discovery_info): + print("Verifying \"getAllCores\"...") ggc_info_list = discovery_info.getAllCores() - print("Verifying \"getAllCores\"... {0}".format(len(ggc_info_list))) + assert len(ggc_info_list) == 1 _verify_ggc_info(ggc_info_list[0]) print("Pass!") diff --git a/test-integration/run/run.sh b/test-integration/run/run.sh index 35b34c7..8e23c91 100755 --- a/test-integration/run/run.sh +++ b/test-integration/run/run.sh @@ -33,23 +33,14 @@ # Define const USAGE="usage: run.sh " -AWSHost="arn:aws:secretsmanager:us-east-1:180635532705:secret:unit-test/endpoint-HSpeEu" +UnitTestHostArn="arn:aws:secretsmanager:us-east-1:180635532705:secret:unit-test/endpoint-HSpeEu" +GreenGrassHostArn="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/greengrassv1/endpoint-DgM00X" AWSMutualAuth_TodWorker_private_key="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/mqtt5/us/Mqtt5Prod/key-kqgyvf" AWSMutualAuth_TodWorker_certificate="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/mqtt5/us/Mqtt5Prod/cert-VDI1Gd" -# AWSGGDiscovery_TodWorker_private_key="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/greengrassv1/key-QEWWRI" -# AWSGGDiscovery_TodWorker_certificate="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/greengrassv1/cert-2GJc26" - -# AWSGGDiscovery_TodWorker_private_key="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/GreengrassDiscovery/key-Ki81FY" -# AWSGGDiscovery_TodWorker_certificate="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/GreengrassDiscovery/cert-bxUN3i" - -AWSGGDiscovery_TodWorker_private_key="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/Greengrass/key-tHGj1k" -AWSGGDiscovery_TodWorker_certificate="arn:aws:secretsmanager:us-east-1:180635532705:secret:ci/Greengrass/cert-6RYeYf" - - -# AWSSecretForWebsocket_TodWorker_KeyId="arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z" -# AWSSecretForWebsocket_TodWorker_SecretKey="arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV" +AWSGGDiscovery_TodWorker_private_key="arn:aws:secretsmanager:us-east-1:180635532705:secret:V1IotSdkIntegrationTestGGDiscoveryPrivateKey-BsLvNP" +AWSGGDiscovery_TodWorker_certificate="arn:aws:secretsmanager:us-east-1:180635532705:secret:V1IotSdkIntegrationTestGGDiscoveryCertificate-DSwdhA" SDKLocation="./AWSIoTPythonSDK" @@ -58,8 +49,8 @@ CREDENTIAL_DIR="./test-integration/Credentials/" TEST_DIR="./test-integration/IntegrationTests/" CA_CERT_URL="https://www.amazontrust.com/repository/AmazonRootCA1.pem" CA_CERT_PATH=${CREDENTIAL_DIR}rootCA.crt -TestHost=$(python3 ${RetrieveAWSKeys} ${AWSHost}) -echo ${TestHost} +TestHost=$(python ${RetrieveAWSKeys} ${UnitTestHostArn}) +GreengrassHost=$(python ${RetrieveAWSKeys} ${GreenGrassHostArn}) @@ -122,14 +113,11 @@ else echo "***************************************************" for file in `ls ${TEST_DIR}` do - # SKIP discovery for now - if [ ${file}x != "IntegrationTestDiscovery.py"x ]; then - continue; - fi if [ ${file##*.}x == "py"x ]; then echo "[SUB] Running test: ${file}..." Scale=10 + Host=TestHost case "$file" in "IntegrationTestMQTTConnection.py") Scale=$2 ;; @@ -141,7 +129,8 @@ else ;; "IntegrationTestConfigurablePublishMessageQueueing.py") Scale="" ;; - "IntegrationTestDiscovery.py") Scale="" + "IntegrationTestDiscovery.py") Scale="" + Host=${GreengrassHost} ;; "IntegrationTestAsyncAPIGeneralNotificationCallbacks.py") Scale="" ;;