diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index fa140273b22..305a2225066 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -122,55 +122,17 @@ jobs: run: | gh pr checkout ${{ needs.triage.outputs.pr_num }} + - uses: oNaiPs/secrets-to-env-action@v1 + with: + secrets: ${{ toJSON(secrets) }} + - name: Run end to end tests continue-on-error: true id: test env: - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} - AWS_REGION: ${{ secrets.AWS_REGION }} AWS_RUN_IDENTITY_TESTS: true - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - AZURE_APP_INSIGHTS_APP_ID: ${{ secrets.AZURE_APP_INSIGHTS_APP_ID }} - AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} - AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY }} - AZURE_DATA_EXPLORER_DB: ${{ secrets.AZURE_DATA_EXPLORER_DB }} - AZURE_DATA_EXPLORER_ENDPOINT: ${{ secrets.AZURE_DATA_EXPLORER_ENDPOINT }} - AZURE_DEVOPS_BUILD_DEFINITION_ID: ${{ secrets.AZURE_DEVOPS_BUILD_DEFINITION_ID }} - AZURE_DEVOPS_ORGANIZATION_URL: ${{ secrets.AZURE_DEVOPS_ORGANIZATION_URL }} - AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} - AZURE_DEVOPS_POOL_NAME: ${{ secrets.AZURE_DEVOPS_POOL_NAME }} - AZURE_DEVOPS_PROJECT: ${{ secrets.AZURE_DEVOPS_PROJECT }} - AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING : ${{ secrets.AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING }} - AZURE_KEYVAULT_URI: ${{ secrets.AZURE_KEYVAULT_URI }} - AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }} AZURE_RUN_WORKLOAD_IDENTITY_TESTS: true - AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} - AZURE_SERVICE_BUS_CONNECTION_STRING: ${{ secrets.AZURE_SERVICE_BUS_CONNECTION_STRING }} - AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING: ${{ secrets.AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING }} - AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }} - AZURE_SP_OBJECT_ID: ${{ secrets.AZURE_SP_OBJECT_ID }} - AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} - AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} - AZURE_SP_ALTERNATIVE_APP_ID: ${{ secrets.AZURE_SP_ALTERNATIVE_APP_ID }} - AZURE_SP_ALTERNATIVE_OBJECT_ID: ${{ secrets.AZURE_SP_ALTERNATIVE_OBJECT_ID }} - AZURE_SP_ALTERNATIVE_KEY: ${{ secrets.AZURE_SP_ALTERNATIVE_KEY }} - AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} - AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} - DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY}} - DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY}} - DATADOG_SITE: ${{ secrets.DATADOG_SITE}} E2E_IMAGE_TAG: ${{ needs.triage.outputs.image_tag }} - GCP_SP_KEY: ${{ secrets.GCP_SP_KEY }} - NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}} - NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}} - NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}} - OIDC_ISSUER_URL: ${{ secrets.OIDC_ISSUER_URLPR }} - OPENSTACK_AUTH_URL: ${{ secrets.OPENSTACK_AUTH_URL }} - OPENSTACK_PASSWORD: ${{ secrets.OPENSTACK_PASSWORD }} - OPENSTACK_PROJECT_ID: ${{ secrets.OPENSTACK_PROJECT_ID }} - OPENSTACK_USER_ID: ${{ secrets.OPENSTACK_USER_ID }} - PREDICTKUBE_API_KEY: ${{ secrets.PREDICTKUBE_API_KEY }} TEST_CLUSTER_NAME: keda-pr-run run: | MESSAGE="${{ github.event.comment.body }}" @@ -186,11 +148,6 @@ jobs: if: ${{ always() }} run: make e2e-test-clean env: - AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} - AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }} - AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} - AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} - AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} TEST_CLUSTER_NAME: keda-pr-run - name: React to comment with success diff --git a/.github/workflows/template-main-e2e-test.yml b/.github/workflows/template-main-e2e-test.yml index b8b9c18346c..640b7c53ded 100644 --- a/.github/workflows/template-main-e2e-test.yml +++ b/.github/workflows/template-main-e2e-test.yml @@ -19,60 +19,16 @@ jobs: - name: Register workspace path run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - uses: oNaiPs/secrets-to-env-action@v1 + with: + secrets: ${{ toJSON(secrets) }} + - name: Run end to end tests env: - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} - AWS_REGION: ${{ secrets.AWS_REGION }} AWS_RUN_IDENTITY_TESTS: true - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - AZURE_APP_INSIGHTS_APP_ID: ${{ secrets.AZURE_APP_INSIGHTS_APP_ID }} - AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} - AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY }} - AZURE_DATA_EXPLORER_DB: ${{ secrets.AZURE_DATA_EXPLORER_DB }} - AZURE_DATA_EXPLORER_ENDPOINT: ${{ secrets.AZURE_DATA_EXPLORER_ENDPOINT }} - AZURE_DEVOPS_BUILD_DEFINITION_ID: ${{ secrets.AZURE_DEVOPS_BUILD_DEFINITION_ID }} - AZURE_DEVOPS_ORGANIZATION_URL: ${{ secrets.AZURE_DEVOPS_ORGANIZATION_URL }} - AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} - AZURE_DEVOPS_POOL_NAME: ${{ secrets.AZURE_DEVOPS_POOL_NAME }} - AZURE_DEVOPS_PROJECT: ${{ secrets.AZURE_DEVOPS_PROJECT }} - AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING : ${{ secrets.AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING }} - AZURE_KEYVAULT_URI: ${{ secrets.AZURE_KEYVAULT_URI }} - AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }} - AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} AZURE_RUN_WORKLOAD_IDENTITY_TESTS: true - AZURE_SERVICE_BUS_CONNECTION_STRING: ${{ secrets.AZURE_SERVICE_BUS_CONNECTION_STRING }} - AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING: ${{ secrets.AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING }} - AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }} - AZURE_SP_OBJECT_ID: ${{ secrets.AZURE_SP_OBJECT_ID }} - AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} - AZURE_SP_ALTERNATIVE_APP_ID: ${{ secrets.AZURE_SP_ALTERNATIVE_APP_ID }} - AZURE_SP_ALTERNATIVE_OBJECT_ID: ${{ secrets.AZURE_SP_ALTERNATIVE_OBJECT_ID }} - AZURE_SP_ALTERNATIVE_KEY: ${{ secrets.AZURE_SP_ALTERNATIVE_KEY }} - AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} - AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} - AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} - DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY}} - DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY}} - DATADOG_SITE: ${{ secrets.DATADOG_SITE}} - GCP_SP_KEY: ${{ secrets.GCP_SP_KEY }} - NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}} - NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}} - NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}} - OIDC_ISSUER_URL: ${{ secrets.OIDC_ISSUER_URLNIGHTLY }} - OPENSTACK_AUTH_URL: ${{ secrets.OPENSTACK_AUTH_URL }} - OPENSTACK_PASSWORD: ${{ secrets.OPENSTACK_PASSWORD }} - OPENSTACK_PROJECT_ID: ${{ secrets.OPENSTACK_PROJECT_ID }} - OPENSTACK_USER_ID: ${{ secrets.OPENSTACK_USER_ID }} - PREDICTKUBE_API_KEY: ${{ secrets.PREDICTKUBE_API_KEY }} run: make e2e-test - name: Delete all e2e related namespaces if: ${{ always() }} run: make e2e-test-clean - env: - AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} - AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }} - AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} - AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} - AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} diff --git a/.github/workflows/v1-build.yml b/.github/workflows/v1-build.yml index 515d8beb5d9..f96218471a3 100644 --- a/.github/workflows/v1-build.yml +++ b/.github/workflows/v1-build.yml @@ -37,11 +37,11 @@ jobs: - name: Run end to end tests env: - AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }} - AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }} - AZURE_SP_APP_ID: ${{ secrets.AZURE_SP_APP_ID }} + TF_AZURE_SUBSCRIPTION: ${{ secrets.TF_AZURE_SUBSCRIPTION }} + TF_AZURE_RESOURCE_GROUP: ${{ secrets.TF_AZURE_RESOURCE_GROUP }} + TF_AZURE_SP_APP_ID: ${{ secrets.TF_AZURE_SP_APP_ID }} AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }} - AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }} - AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} - AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }} + TF_AZURE_SP_TENANT: ${{ secrets.TF_AZURE_SP_TENANT }} + TF_AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.TF_AZURE_STORAGE_CONNECTION_STRING }} + TF_AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.TF_AZURE_LOG_ANALYTICS_WORKSPACE_ID }} run: make e2e-test diff --git a/Makefile b/Makefile index e6bf38b6cf5..c5b64754bf2 100644 --- a/Makefile +++ b/Makefile @@ -79,11 +79,11 @@ test: manifests generate fmt vet envtest install-test-deps ## Run tests and expo .PHONY: get-cluster-context get-cluster-context: ## Get Azure cluster context. - @az login --service-principal -u $(AZURE_SP_APP_ID) -p "$(AZURE_SP_KEY)" --tenant $(AZURE_SP_TENANT) + @az login --service-principal -u $(TF_AZURE_SP_APP_ID) -p "$(AZURE_SP_KEY)" --tenant $(TF_AZURE_SP_TENANT) @az aks get-credentials \ --name $(TEST_CLUSTER_NAME) \ - --subscription $(AZURE_SUBSCRIPTION) \ - --resource-group $(AZURE_RESOURCE_GROUP) + --subscription $(TF_AZURE_SUBSCRIPTION) \ + --resource-group $(TF_AZURE_RESOURCE_GROUP) .PHONY: e2e-test e2e-test: get-cluster-context ## Run e2e tests against Azure cluster. @@ -252,11 +252,11 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in if [ "$(AZURE_RUN_WORKLOAD_IDENTITY_TESTS)" = true ]; then \ cd config/service_account && \ $(KUSTOMIZE) edit add label --force azure.workload.identity/use:true; \ - $(KUSTOMIZE) edit add annotation --force azure.workload.identity/client-id:${AZURE_SP_APP_ID} azure.workload.identity/tenant-id:${AZURE_SP_TENANT}; \ + $(KUSTOMIZE) edit add annotation --force azure.workload.identity/client-id:${TF_AZURE_IDENTITY_1_APP_ID} azure.workload.identity/tenant-id:${TF_AZURE_SP_TENANT}; \ fi if [ "$(AWS_RUN_IDENTITY_TESTS)" = true ]; then \ cd config/service_account && \ - $(KUSTOMIZE) edit add annotation --force eks.amazonaws.com/role-arn:arn:aws:iam::${AWS_ACCOUNT_ID}:role/${TEST_CLUSTER_NAME}; \ + $(KUSTOMIZE) edit add annotation --force eks.amazonaws.com/role-arn:arn:aws:iam::${TF_AWS_ACCOUNT_ID}:role/${TEST_CLUSTER_NAME}-role; \ fi # Need this workaround to mitigate a problem with inserting labels into selectors, # until this issue is solved: https://github.com/kubernetes-sigs/kustomize/issues/1009 diff --git a/tests/.env b/tests/.env index 10a366ac921..2532b909413 100644 --- a/tests/.env +++ b/tests/.env @@ -1,29 +1,29 @@ # OPENSTACK_REGION_NAME= # OPENSTACK_SWIFT_URL= -AWS_ACCESS_KEY= -AWS_REGION= -AWS_SECRET_KEY= -AZURE_APP_INSIGHTS_APP_ID= -AZURE_APP_INSIGHTS_CONNECTION_STRING= -AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY= -AZURE_DATA_EXPLORER_DB= -AZURE_DATA_EXPLORER_ENDPOINT= +TF_AWS_ACCESS_KEY= +TF_AWS_REGION= +TF_AWS_SECRET_KEY= +TF_AZURE_APP_INSIGHTS_APP_ID= +TF_AZURE_APP_INSIGHTS_CONNECTION_STRING= +TF_AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY= +TF_AZURE_DATA_EXPLORER_DB= +TF_AZURE_DATA_EXPLORER_ENDPOINT= AZURE_DEVOPS_BUILD_DEFINITION_ID= AZURE_DEVOPS_ORGANIZATION_URL= AZURE_DEVOPS_PAT= AZURE_DEVOPS_POOL_NAME= AZURE_DEVOPS_PROJECT= -AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING= -AZURE_KEYVAULT_URI= -AZURE_LOG_ANALYTICS_WORKSPACE_ID= -AZURE_RESOURCE_GROUP= -AZURE_SERVICE_BUS_CONNECTION_STRING= -AZURE_SP_APP_ID= +TF_AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING= +TF_AZURE_KEYVAULT_URI= +TF_AZURE_LOG_ANALYTICS_WORKSPACE_ID= +TF_AZURE_RESOURCE_GROUP= +TF_AZURE_SERVICE_BUS_CONNECTION_STRING= +TF_AZURE_SP_APP_ID= AZURE_SP_KEY= -AZURE_SP_OBJECT_ID= -AZURE_SP_TENANT= -AZURE_STORAGE_CONNECTION_STRING= -AZURE_SUBSCRIPTION= +TF_AZURE_SP_OBJECT_ID= +TF_AZURE_SP_TENANT= +TF_AZURE_STORAGE_CONNECTION_STRING= +TF_AZURE_SUBSCRIPTION= DATADOG_APP_KEY= DATADOG_API_KEY= DATADOG_SITE= diff --git a/tests/README.md b/tests/README.md index f1538500922..16597bcdb8a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,7 +2,7 @@ - [go](https://go.dev/) - `kubectl` logged into a Kubernetes cluster. -- Each scaler test might define additional requirements. For example, `azure_queue_test.go` requires an env var `AZURE_STORAGE_CONNECTION_STRING` +- Each scaler test might define additional requirements. For example, `azure_queue_test.go` requires an env var `TF_AZURE_STORAGE_CONNECTION_STRING` ## Running tests: @@ -206,3 +206,13 @@ you're trying to achieve is too complicated or tedious using above, use `ParseCo for executing shell commands. - Ensure, ensure, ensure that you're cleaning up resources. - You can use `VS Code` for easily debugging your tests. + +## E2E Test infrastructure + +For improving the reliability of e2e test, we try to have all resources under kedacore control using kedacore docker images rather end-users registry images (without official support) and cloud resources in kedacore accounts. + +In order to manage these e2e resources, there are 2 different repositories: +- [kedacore/test-tools](https://github.com/kedacore/test-tools) for docker images management. +- [kedacore/testing-infrastructure](https://github.com/kedacore/testing-infrastructure) for cloud resources. + +If any change is needed in e2e test infrastructure, please open a PR in those repositories and use kedacore resources for e2e tests. diff --git a/tests/helper/helper.go b/tests/helper/helper.go index 7706d4cc2fa..f10083c6aac 100644 --- a/tests/helper/helper.go +++ b/tests/helper/helper.go @@ -51,7 +51,7 @@ var random = rand.New(rand.NewSource(time.Now().UnixNano())) // Env variables required for setup and cleanup. var ( - AzureADTenantID = os.Getenv("AZURE_SP_TENANT") + AzureADTenantID = os.Getenv("TF_AZURE_SP_TENANT") AzureRunWorkloadIdentityTests = os.Getenv("AZURE_RUN_WORKLOAD_IDENTITY_TESTS") AwsIdentityTests = os.Getenv("AWS_RUN_IDENTITY_TESTS") ) diff --git a/tests/run-all.sh b/tests/run-all.sh index 058be594456..643677df0b0 100755 --- a/tests/run-all.sh +++ b/tests/run-all.sh @@ -6,7 +6,7 @@ E2E_REGEX="./*${E2E_TEST_REGEX:-*_test.go}" DIR=$(dirname "$0") cd $DIR -concurrent_tests_limit=8 +concurrent_tests_limit=12 pids=() lookup=() failed_count=0 diff --git a/tests/scalers/aws/aws_cloudwatch/aws_cloudwatch_test.go b/tests/scalers/aws/aws_cloudwatch/aws_cloudwatch_test.go index 82cc86dd1fc..4b74b25fd09 100644 --- a/tests/scalers/aws/aws_cloudwatch/aws_cloudwatch_test.go +++ b/tests/scalers/aws/aws_cloudwatch/aws_cloudwatch_test.go @@ -130,10 +130,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - cloudwatchMetricName = fmt.Sprintf("%s-keda-metric-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + cloudwatchMetricName = fmt.Sprintf("cw-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") cloudwatchMetricNamespace = "KEDA" cloudwatchMetricDimensionName = "dimensionName" cloudwatchMetricDimensionValue = "dimensionValue" diff --git a/tests/scalers/aws/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go b/tests/scalers/aws/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go index 8d64450244c..9f585e06e02 100644 --- a/tests/scalers/aws/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go +++ b/tests/scalers/aws/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go @@ -128,10 +128,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - cloudwatchMetricName = fmt.Sprintf("%s-keda-metric-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + cloudwatchMetricName = fmt.Sprintf("cw-expr-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") cloudwatchMetricNamespace = "KEDA_EXPRESSION" cloudwatchMetricDimensionName = "dimensionName" cloudwatchMetricDimensionValue = "dimensionValue" diff --git a/tests/scalers/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_test.go b/tests/scalers/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_test.go index 180d4495f75..c7715af4f67 100644 --- a/tests/scalers/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_test.go +++ b/tests/scalers/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_test.go @@ -117,10 +117,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - cloudwatchMetricName = fmt.Sprintf("%s-keda-metric-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + cloudwatchMetricName = fmt.Sprintf("cw-identity-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") cloudwatchMetricNamespace = "KEDA" cloudwatchMetricDimensionName = "dimensionName" cloudwatchMetricDimensionValue = "dimensionValue" diff --git a/tests/scalers/aws/aws_dynamodb/aws_dynamodb_test.go b/tests/scalers/aws/aws_dynamodb/aws_dynamodb_test.go index bf8f8f7ce91..664120ccd59 100644 --- a/tests/scalers/aws/aws_dynamodb/aws_dynamodb_test.go +++ b/tests/scalers/aws/aws_dynamodb/aws_dynamodb_test.go @@ -129,10 +129,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - dynamoDBTableName = fmt.Sprintf("%s-keda-table-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + dynamoDBTableName = fmt.Sprintf("table-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") expressionAttributeNames = "{ \"#k\" : \"event_type\"}" keyConditionExpression = "#k = :key" expressionAttributeValues = "{ \":key\" : {\"S\":\"scaling_event\"}}" diff --git a/tests/scalers/aws/aws_dynamodb_pod_identity/aws_dynamodb_pod_identity_test.go b/tests/scalers/aws/aws_dynamodb_pod_identity/aws_dynamodb_pod_identity_test.go index 57e13807d5a..cbbbc0fd0b5 100644 --- a/tests/scalers/aws/aws_dynamodb_pod_identity/aws_dynamodb_pod_identity_test.go +++ b/tests/scalers/aws/aws_dynamodb_pod_identity/aws_dynamodb_pod_identity_test.go @@ -116,10 +116,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - dynamoDBTableName = fmt.Sprintf("%s-keda-table-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + dynamoDBTableName = fmt.Sprintf("table-identity-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") expressionAttributeNames = "{ \"#k\" : \"event_type\"}" keyConditionExpression = "#k = :key" expressionAttributeValues = "{ \":key\" : {\"S\":\"scaling_event\"}}" diff --git a/tests/scalers/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go b/tests/scalers/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go index 04cdfd16591..ce60c79b58a 100644 --- a/tests/scalers/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go +++ b/tests/scalers/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go @@ -35,15 +35,15 @@ const ( ) var ( - awsRegion = os.Getenv("AWS_REGION") - awsAccessKey = os.Getenv("AWS_ACCESS_KEY") - awsSecretKey = os.Getenv("AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") + awsAccessKey = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretKey = os.Getenv("TF_AWS_SECRET_KEY") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - tableName = fmt.Sprintf("%s-table-%d", testName, GetRandomNumber()) + tableName = fmt.Sprintf("stream-%d", GetRandomNumber()) shardCount = 2 // default count activationShardCount = 0 // default count ) diff --git a/tests/scalers/aws/aws_dynamodb_streams_pod_identity/aws_dynamodb_streams_pod_identity_test.go b/tests/scalers/aws/aws_dynamodb_streams_pod_identity/aws_dynamodb_streams_pod_identity_test.go index 8a9e60e2ff7..417de0bff67 100644 --- a/tests/scalers/aws/aws_dynamodb_streams_pod_identity/aws_dynamodb_streams_pod_identity_test.go +++ b/tests/scalers/aws/aws_dynamodb_streams_pod_identity/aws_dynamodb_streams_pod_identity_test.go @@ -35,15 +35,15 @@ const ( ) var ( - awsRegion = os.Getenv("AWS_REGION") - awsAccessKey = os.Getenv("AWS_ACCESS_KEY") - awsSecretKey = os.Getenv("AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") + awsAccessKey = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretKey = os.Getenv("TF_AWS_SECRET_KEY") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - tableName = fmt.Sprintf("%s-table-%d", testName, GetRandomNumber()) + tableName = fmt.Sprintf("stream-identity-%d", GetRandomNumber()) shardCount = 2 // default count activationShardCount = 0 // default count ) diff --git a/tests/scalers/aws/aws_kinesis_stream/aws_kinesis_stream_test.go b/tests/scalers/aws/aws_kinesis_stream/aws_kinesis_stream_test.go index 9edf8b4da9b..f8e9043eafd 100644 --- a/tests/scalers/aws/aws_kinesis_stream/aws_kinesis_stream_test.go +++ b/tests/scalers/aws/aws_kinesis_stream/aws_kinesis_stream_test.go @@ -127,10 +127,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - kinesisStreamName = fmt.Sprintf("%s-keda-stream-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + kinesisStreamName = fmt.Sprintf("kinesis-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") maxReplicaCount = 2 minReplicaCount = 0 ) diff --git a/tests/scalers/aws/aws_kinesis_stream_pod_identity/aws_kinesis_stream_pod_identity_test.go b/tests/scalers/aws/aws_kinesis_stream_pod_identity/aws_kinesis_stream_pod_identity_test.go index 7fbaa0464f4..d5fd6eb53de 100644 --- a/tests/scalers/aws/aws_kinesis_stream_pod_identity/aws_kinesis_stream_pod_identity_test.go +++ b/tests/scalers/aws/aws_kinesis_stream_pod_identity/aws_kinesis_stream_pod_identity_test.go @@ -114,10 +114,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - kinesisStreamName = fmt.Sprintf("%s-keda-stream-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + kinesisStreamName = fmt.Sprintf("kinesis-identity-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") maxReplicaCount = 2 minReplicaCount = 0 ) diff --git a/tests/scalers/aws/aws_sqs_queue/aws_sqs_queue_test.go b/tests/scalers/aws/aws_sqs_queue/aws_sqs_queue_test.go index df54c771878..41dd74133bd 100644 --- a/tests/scalers/aws/aws_sqs_queue/aws_sqs_queue_test.go +++ b/tests/scalers/aws/aws_sqs_queue/aws_sqs_queue_test.go @@ -121,10 +121,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - sqsQueueName = fmt.Sprintf("%s-keda-queue-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + sqsQueueName = fmt.Sprintf("queue-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") maxReplicaCount = 2 minReplicaCount = 0 ) diff --git a/tests/scalers/aws/aws_sqs_queue_pod_identity/aws_sqs_queue_pod_identity_test.go b/tests/scalers/aws/aws_sqs_queue_pod_identity/aws_sqs_queue_pod_identity_test.go index 8487bdb36c5..9466ba46056 100644 --- a/tests/scalers/aws/aws_sqs_queue_pod_identity/aws_sqs_queue_pod_identity_test.go +++ b/tests/scalers/aws/aws_sqs_queue_pod_identity/aws_sqs_queue_pod_identity_test.go @@ -108,10 +108,10 @@ var ( deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) - sqsQueueName = fmt.Sprintf("%s-keda-queue-%d", testName, GetRandomNumber()) - awsAccessKeyID = os.Getenv("AWS_ACCESS_KEY") - awsSecretAccessKey = os.Getenv("AWS_SECRET_KEY") - awsRegion = os.Getenv("AWS_REGION") + sqsQueueName = fmt.Sprintf("queue-identity-%d", GetRandomNumber()) + awsAccessKeyID = os.Getenv("TF_AWS_ACCESS_KEY") + awsSecretAccessKey = os.Getenv("TF_AWS_SECRET_KEY") + awsRegion = os.Getenv("TF_AWS_REGION") maxReplicaCount = 2 minReplicaCount = 0 ) diff --git a/tests/scalers/azure/azure_application_insights/azure_application_insights_test.go b/tests/scalers/azure/azure_application_insights/azure_application_insights_test.go index aecd164c46e..60353fdee2a 100644 --- a/tests/scalers/azure/azure_application_insights/azure_application_insights_test.go +++ b/tests/scalers/azure/azure_application_insights/azure_application_insights_test.go @@ -27,14 +27,14 @@ const ( ) var ( - appInsightsAppID = os.Getenv("AZURE_APP_INSIGHTS_APP_ID") - appInsightsInstrumentationKey = os.Getenv("AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY") - appInsightsConnectionstring = os.Getenv("AZURE_APP_INSIGHTS_CONNECTION_STRING") - appInsightsMetricName = fmt.Sprintf("%s-%d", testName, GetRandomNumber()) + appInsightsAppID = os.Getenv("TF_AZURE_APP_INSIGHTS_APP_ID") + appInsightsInstrumentationKey = os.Getenv("TF_AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY") + appInsightsConnectionstring = os.Getenv("TF_AZURE_APP_INSIGHTS_CONNECTION_STRING") + appInsightsMetricName = fmt.Sprintf("metric-%d", GetRandomNumber()) appInsightsRole = fmt.Sprintf("%s-role", testName) - azureADClientID = os.Getenv("AZURE_SP_APP_ID") + azureADClientID = os.Getenv("TF_AZURE_SP_APP_ID") azureADSecret = os.Getenv("AZURE_SP_KEY") - azureADTenantID = os.Getenv("AZURE_SP_TENANT") + azureADTenantID = os.Getenv("TF_AZURE_SP_TENANT") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -148,12 +148,12 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, appInsightsAppID, "AZURE_APP_INSIGHTS_APP_ID env variable is required for application insights tests") - require.NotEmpty(t, appInsightsInstrumentationKey, "AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY env variable is required for application insights tests") - require.NotEmpty(t, appInsightsConnectionstring, "AZURE_APP_INSIGHTS_CONNECTION_STRING env variable is required for application insights tests") - require.NotEmpty(t, azureADClientID, "AZURE_SP_APP_ID env variable is required for application insights tests") + require.NotEmpty(t, appInsightsAppID, "TF_AZURE_APP_INSIGHTS_APP_ID env variable is required for application insights tests") + require.NotEmpty(t, appInsightsInstrumentationKey, "TF_AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY env variable is required for application insights tests") + require.NotEmpty(t, appInsightsConnectionstring, "TF_AZURE_APP_INSIGHTS_CONNECTION_STRING env variable is required for application insights tests") + require.NotEmpty(t, azureADClientID, "TF_AZURE_SP_APP_ID env variable is required for application insights tests") require.NotEmpty(t, azureADSecret, "AZURE_SP_KEY env variable is required for application insights tests") - require.NotEmpty(t, azureADTenantID, "AZURE_SP_TENANT env variable is required for application insights tests") + require.NotEmpty(t, azureADTenantID, "TF_AZURE_SP_TENANT env variable is required for application insights tests") client := appinsights.NewTelemetryClient(appInsightsInstrumentationKey) // Create kubernetes resources diff --git a/tests/scalers/azure/azure_blob/azure_blob_test.go b/tests/scalers/azure/azure_blob/azure_blob_test.go index f687871d9fa..2871f88a92f 100644 --- a/tests/scalers/azure/azure_blob/azure_blob_test.go +++ b/tests/scalers/azure/azure_blob/azure_blob_test.go @@ -31,12 +31,12 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - containerName = fmt.Sprintf("%s-container-%d", testName, GetRandomNumber()) + containerName = fmt.Sprintf("container-%d", GetRandomNumber()) ) type templateData struct { @@ -126,7 +126,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for azure blob test") + require.NotEmpty(t, connectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for azure blob test") containerURL := createContainer(t) diff --git a/tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go b/tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go index ae1977bb343..368436ac25a 100644 --- a/tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go +++ b/tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go @@ -25,11 +25,11 @@ const ( ) var ( - dataExplorerDB = os.Getenv("AZURE_DATA_EXPLORER_DB") - dataExplorerEndpoint = os.Getenv("AZURE_DATA_EXPLORER_ENDPOINT") - azureADClientID = os.Getenv("AZURE_SP_APP_ID") + dataExplorerDB = os.Getenv("TF_AZURE_DATA_EXPLORER_DB") + dataExplorerEndpoint = os.Getenv("TF_AZURE_DATA_EXPLORER_ENDPOINT") + azureADClientID = os.Getenv("TF_AZURE_SP_APP_ID") azureADSecret = os.Getenv("AZURE_SP_KEY") - azureADTenantID = os.Getenv("AZURE_SP_TENANT") + azureADTenantID = os.Getenv("TF_AZURE_SP_TENANT") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -137,11 +137,11 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, dataExplorerDB, "AZURE_DATA_EXPLORER_DB env variable is required for deployment bus tests") - require.NotEmpty(t, dataExplorerEndpoint, "AZURE_DATA_EXPLORER_ENDPOINT env variable is required for deployment bus tests") - require.NotEmpty(t, azureADClientID, "AZURE_SP_APP_ID env variable is required for deployment bus tests") + require.NotEmpty(t, dataExplorerDB, "TF_AZURE_DATA_EXPLORER_DB env variable is required for deployment bus tests") + require.NotEmpty(t, dataExplorerEndpoint, "TF_AZURE_DATA_EXPLORER_ENDPOINT env variable is required for deployment bus tests") + require.NotEmpty(t, azureADClientID, "TF_AZURE_SP_APP_ID env variable is required for deployment bus tests") require.NotEmpty(t, azureADSecret, "AZURE_SP_KEY env variable is required for deployment bus tests") - require.NotEmpty(t, azureADTenantID, "AZURE_SP_TENANT env variable is required for deployment bus tests") + require.NotEmpty(t, azureADTenantID, "TF_AZURE_SP_TENANT env variable is required for deployment bus tests") // Create kubernetes resources kc := GetKubernetesClient(t) diff --git a/tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go b/tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go index 33c8c19f6e5..29df9108405 100644 --- a/tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go +++ b/tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go @@ -33,12 +33,11 @@ const ( ) var ( - random = GetRandomNumber() - eventHubName = fmt.Sprintf("keda-eh-%d", random) - namespaceConnectionString = os.Getenv("AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING") + eventHubName = fmt.Sprintf("keda-eh-%d", GetRandomNumber()) + namespaceConnectionString = os.Getenv("TF_AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING") eventhubConnectionString = fmt.Sprintf("%s;EntityPath=%s", namespaceConnectionString, eventHubName) - storageConnectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") - checkpointContainerName = fmt.Sprintf("keda-checkpoint-%d", random) + storageConnectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") + checkpointContainerName = fmt.Sprintf("blob-checkpoint-%d", GetRandomNumber()) testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -154,8 +153,8 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, namespaceConnectionString, "AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING env variable is required for azure eventhub test") - require.NotEmpty(t, storageConnectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for azure eventhub test") + require.NotEmpty(t, namespaceConnectionString, "TF_AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING env variable is required for azure eventhub test") + require.NotEmpty(t, storageConnectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for azure eventhub test") adminClient, client := createEventHub(t) container := createContainer(t) @@ -170,7 +169,7 @@ func TestScaler(t *testing.T) { addEvents(t, client, 1) assert.True(t, WaitForDeploymentReplicaReadyCount(t, kc, deploymentName, testNamespace, 1, 60, 1), "replica count should be 1 after 1 minute") - time.Sleep(time.Duration(10) * time.Second) + time.Sleep(time.Duration(60) * time.Second) KubectlApplyMultipleWithTemplate(t, data, []Template{{Name: "scaledObjectTemplate", Config: scaledObjectTemplate}}) assert.True(t, WaitForDeploymentReplicaReadyCount(t, kc, deploymentName, testNamespace, 0, 60, 1), diff --git a/tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go b/tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go index 110a2eaa723..ef84f6a8786 100644 --- a/tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go +++ b/tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go @@ -33,12 +33,11 @@ const ( ) var ( - random = GetRandomNumber() - eventHubName = fmt.Sprintf("keda-eh-%d", random) - namespaceConnectionString = os.Getenv("AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING") + eventHubName = fmt.Sprintf("keda-eh-%d", GetRandomNumber()) + namespaceConnectionString = os.Getenv("TF_AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING") eventhubConnectionString = fmt.Sprintf("%s;EntityPath=%s", namespaceConnectionString, eventHubName) - storageConnectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") - checkpointContainerName = fmt.Sprintf("keda-checkpoint-%d", random) + storageConnectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") + checkpointContainerName = fmt.Sprintf("go-checkpoint-%d", GetRandomNumber()) testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -154,8 +153,8 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, namespaceConnectionString, "AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING env variable is required for azure eventhub test") - require.NotEmpty(t, storageConnectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for azure eventhub test") + require.NotEmpty(t, namespaceConnectionString, "TF_AZURE_EVENTHBUS_MANAGEMENT_CONNECTION_STRING env variable is required for azure eventhub test") + require.NotEmpty(t, storageConnectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for azure eventhub test") adminClient, client := createEventHub(t) container := createContainer(t) @@ -170,7 +169,7 @@ func TestScaler(t *testing.T) { addEvents(t, client, 1) assert.True(t, WaitForDeploymentReplicaReadyCount(t, kc, deploymentName, testNamespace, 1, 60, 1), "replica count should be 1 after 1 minute") - time.Sleep(time.Duration(10) * time.Second) + time.Sleep(time.Duration(60) * time.Second) KubectlApplyMultipleWithTemplate(t, data, []Template{{Name: "scaledObjectTemplate", Config: scaledObjectTemplate}}) assert.True(t, WaitForDeploymentReplicaReadyCount(t, kc, deploymentName, testNamespace, 0, 60, 1), diff --git a/tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go b/tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go index 43559044350..41340d531a5 100644 --- a/tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go +++ b/tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go @@ -25,10 +25,10 @@ const ( ) var ( - logAnalyticsWorkspaceID = os.Getenv("AZURE_LOG_ANALYTICS_WORKSPACE_ID") - azureADClientID = os.Getenv("AZURE_SP_APP_ID") + logAnalyticsWorkspaceID = os.Getenv("TF_AZURE_LOG_ANALYTICS_WORKSPACE_ID") + azureADClientID = os.Getenv("TF_AZURE_SP_APP_ID") azureADSecret = os.Getenv("AZURE_SP_KEY") - azureADTenantID = os.Getenv("AZURE_SP_TENANT") + azureADTenantID = os.Getenv("TF_AZURE_SP_TENANT") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -127,10 +127,10 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, logAnalyticsWorkspaceID, "AZURE_LOG_ANALYTICS_WORKSPACE_ID env variable is required for deployment bus tests") - require.NotEmpty(t, azureADClientID, "AZURE_SP_APP_ID env variable is required for deployment bus tests") + require.NotEmpty(t, logAnalyticsWorkspaceID, "TF_AZURE_LOG_ANALYTICS_WORKSPACE_ID env variable is required for deployment bus tests") + require.NotEmpty(t, azureADClientID, "TF_AZURE_SP_APP_ID env variable is required for deployment bus tests") require.NotEmpty(t, azureADSecret, "AZURE_SP_KEY env variable is required for deployment bus tests") - require.NotEmpty(t, azureADTenantID, "AZURE_SP_TENANT env variable is required for deployment bus tests") + require.NotEmpty(t, azureADTenantID, "TF_AZURE_SP_TENANT env variable is required for deployment bus tests") // Create kubernetes resources kc := GetKubernetesClient(t) diff --git a/tests/scalers/azure/azure_queue/azure_queue_test.go b/tests/scalers/azure/azure_queue/azure_queue_test.go index cdf7f8ec1c1..8ea288ab426 100644 --- a/tests/scalers/azure/azure_queue/azure_queue_test.go +++ b/tests/scalers/azure/azure_queue/azure_queue_test.go @@ -31,12 +31,12 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - queueName = fmt.Sprintf("%s-queue-%d", testName, GetRandomNumber()) + queueName = fmt.Sprintf("queue-%d", GetRandomNumber()) ) type templateData struct { @@ -116,7 +116,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for azure queue test") + require.NotEmpty(t, connectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for azure queue test") queueURL, messageURL := createQueue(t) diff --git a/tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go b/tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go index fcd10b096b4..073705bc38d 100644 --- a/tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go +++ b/tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go @@ -28,13 +28,13 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - queueName = fmt.Sprintf("%s-queue-%d", testName, GetRandomNumber()) + queueName = fmt.Sprintf("queue-%d", GetRandomNumber()) ) type templateData struct { @@ -121,7 +121,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") client, adminClient := setupServiceBusQueue(t) diff --git a/tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go b/tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go index fa62993aaf3..fab990e8959 100644 --- a/tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go +++ b/tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go @@ -28,13 +28,13 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - queuePrefix = fmt.Sprintf("%s-queue-%d", testName, GetRandomNumber()) + queuePrefix = fmt.Sprintf("queue-regex-%d", GetRandomNumber()) ) type templateData struct { @@ -129,7 +129,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") queueName1 := fmt.Sprintf("%s-1", queuePrefix) setupServiceBusQueue(t, queueName1) diff --git a/tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go b/tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go index 1347c710a9e..39322bbc159 100644 --- a/tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go +++ b/tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go @@ -28,14 +28,14 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - topicName = fmt.Sprintf("%s-topic-%d", testName, GetRandomNumber()) - subscriptionName = fmt.Sprintf("%s-subscription-%d", testName, GetRandomNumber()) + topicName = fmt.Sprintf("topic-%d", GetRandomNumber()) + subscriptionName = fmt.Sprintf("subs-%d", GetRandomNumber()) ) type templateData struct { @@ -124,7 +124,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") client, adminClient := setupServiceBusTopicAndSubscription(t) diff --git a/tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go b/tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go index 404d6de8bc3..6526941dc5c 100644 --- a/tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go +++ b/tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go @@ -28,14 +28,14 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) scaledObjectName = fmt.Sprintf("%s-so", testName) - topicName = fmt.Sprintf("%s-topic-%d", testName, GetRandomNumber()) - subscriptionPrefix = fmt.Sprintf("%s-subscription-%d", testName, GetRandomNumber()) + topicName = fmt.Sprintf("topic-%d", GetRandomNumber()) + subscriptionPrefix = fmt.Sprintf("subs-%d", GetRandomNumber()) ) type templateData struct { @@ -132,7 +132,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") client, adminClient := setupServiceBusTopicAndSubscription(t) diff --git a/tests/scalers/graphite/graphite_test.go b/tests/scalers/graphite/graphite_test.go index 43b0a69ae40..6ca5f8694b8 100644 --- a/tests/scalers/graphite/graphite_test.go +++ b/tests/scalers/graphite/graphite_test.go @@ -458,6 +458,7 @@ metadata: name: generate-load-graphite-metrics namespace: {{.TestNamespace}} spec: + ttlSecondsAfterFinished: 0 template: spec: containers: @@ -478,6 +479,7 @@ metadata: name: generate-low-load-graphite-metrics namespace: {{.TestNamespace}} spec: + ttlSecondsAfterFinished: 0 template: spec: containers: @@ -498,6 +500,7 @@ metadata: name: generate-empty-load-graphite-metrics namespace: {{.TestNamespace}} spec: + ttlSecondsAfterFinished: 0 template: spec: containers: diff --git a/tests/scalers/new_relic/new_relic_test.go b/tests/scalers/new_relic/new_relic_test.go index 60e01b9e025..5dae9b0d1a8 100644 --- a/tests/scalers/new_relic/new_relic_test.go +++ b/tests/scalers/new_relic/new_relic_test.go @@ -28,7 +28,7 @@ var ( testNamespace = fmt.Sprintf("%s-ns", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) monitoredDeploymentName = fmt.Sprintf("%s-monitored-deployment", testName) - serviceName = fmt.Sprintf("%s-service-%v", testName, GetRandomNumber()) + serviceName = fmt.Sprintf("%s-service-%d", testName, GetRandomNumber()) scaledObjectName = fmt.Sprintf("%s-so", testName) secretName = fmt.Sprintf("%s-secret", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) diff --git a/tests/secret-providers/azure_keyvault/azure_keyvault_test.go b/tests/secret-providers/azure_keyvault/azure_keyvault_test.go index 0b051c5cc7e..c158ba7f9b1 100644 --- a/tests/secret-providers/azure_keyvault/azure_keyvault_test.go +++ b/tests/secret-providers/azure_keyvault/azure_keyvault_test.go @@ -31,11 +31,11 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") - keyvaultURI = os.Getenv("AZURE_KEYVAULT_URI") - azureADClientID = os.Getenv("AZURE_SP_APP_ID") + connectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") + keyvaultURI = os.Getenv("TF_AZURE_KEYVAULT_URI") + azureADClientID = os.Getenv("TF_AZURE_SP_APP_ID") azureADSecret = os.Getenv("AZURE_SP_KEY") - azureADTenantID = os.Getenv("AZURE_SP_TENANT") + azureADTenantID = os.Getenv("TF_AZURE_SP_TENANT") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -149,11 +149,11 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for key vault tests") - require.NotEmpty(t, keyvaultURI, "AZURE_KEYVAULT_URI env variable is required for key vault tests") - require.NotEmpty(t, azureADClientID, "AZURE_SP_APP_ID env variable is required for key vault tests") + require.NotEmpty(t, connectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for key vault tests") + require.NotEmpty(t, keyvaultURI, "TF_AZURE_KEYVAULT_URI env variable is required for key vault tests") + require.NotEmpty(t, azureADClientID, "TF_AZURE_SP_APP_ID env variable is required for key vault tests") require.NotEmpty(t, azureADSecret, "AZURE_SP_KEY env variable is required for key vault tests") - require.NotEmpty(t, azureADTenantID, "AZURE_SP_TENANT env variable is required for key vault tests") + require.NotEmpty(t, azureADTenantID, "TF_AZURE_SP_TENANT env variable is required for key vault tests") queueURL, messageURL := createQueue(t) diff --git a/tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go b/tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go index 38e824db89b..94f3dfc39bd 100644 --- a/tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go +++ b/tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go @@ -31,8 +31,8 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") - keyvaultURI = os.Getenv("AZURE_KEYVAULT_URI") + connectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") + keyvaultURI = os.Getenv("TF_AZURE_KEYVAULT_URI") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -136,8 +136,8 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for key vault tests") - require.NotEmpty(t, keyvaultURI, "AZURE_KEYVAULT_URI env variable is required for key vault tests") + require.NotEmpty(t, connectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for key vault tests") + require.NotEmpty(t, keyvaultURI, "TF_AZURE_KEYVAULT_URI env variable is required for key vault tests") queueURL, messageURL := createQueue(t) diff --git a/tests/secret-providers/azure_workload_identity/azure_workload_identity_test.go b/tests/secret-providers/azure_workload_identity/azure_workload_identity_test.go index 73fc12a7ca4..becdffdb703 100644 --- a/tests/secret-providers/azure_workload_identity/azure_workload_identity_test.go +++ b/tests/secret-providers/azure_workload_identity/azure_workload_identity_test.go @@ -27,7 +27,7 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) @@ -105,7 +105,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_CONNECTION_STRING env variable is required for service bus tests") client, adminClient, namespace := setupServiceBusQueue(t) diff --git a/tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go b/tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go index 394248c875f..3f8a715e89e 100644 --- a/tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go +++ b/tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go @@ -27,8 +27,8 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING") - azureADClientID = os.Getenv("AZURE_SP_ALTERNATIVE_APP_ID") + connectionString = os.Getenv("TF_AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING") + azureADClientID = os.Getenv("TF_AZURE_IDENTITY_2_APP_ID") testNamespace = fmt.Sprintf("%s-ns", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) triggerAuthName = fmt.Sprintf("%s-ta", testName) @@ -119,8 +119,8 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING env variable is required") - require.NotEmpty(t, azureADClientID, "AZURE_SP_ALTERNATIVE_APP_ID env variable is required for service bus tests") + require.NotEmpty(t, connectionString, "TF_AZURE_SERVICE_BUS_ALTERNATIVE_CONNECTION_STRING env variable is required") + require.NotEmpty(t, azureADClientID, "TF_AZURE_IDENTITY_2_APP_ID env variable is required for service bus tests") client, adminClient, namespace := setupServiceBusQueue(t) diff --git a/tests/secret-providers/trigger_auth_secret/trigger_auth_secret_test.go b/tests/secret-providers/trigger_auth_secret/trigger_auth_secret_test.go index 4d9bae2b668..9b6f7ed81a5 100644 --- a/tests/secret-providers/trigger_auth_secret/trigger_auth_secret_test.go +++ b/tests/secret-providers/trigger_auth_secret/trigger_auth_secret_test.go @@ -31,7 +31,7 @@ const ( ) var ( - connectionString = os.Getenv("AZURE_STORAGE_CONNECTION_STRING") + connectionString = os.Getenv("TF_AZURE_STORAGE_CONNECTION_STRING") testNamespace = fmt.Sprintf("%s-ns", testName) secretName = fmt.Sprintf("%s-secret", testName) deploymentName = fmt.Sprintf("%s-deployment", testName) @@ -131,7 +131,7 @@ spec: func TestScaler(t *testing.T) { // setup t.Log("--- setting up ---") - require.NotEmpty(t, connectionString, "AZURE_STORAGE_CONNECTION_STRING env variable is required for trigger auth tests") + require.NotEmpty(t, connectionString, "TF_AZURE_STORAGE_CONNECTION_STRING env variable is required for trigger auth tests") queueURL, messageURL := createQueue(t) diff --git a/tests/utils/setup_test.go b/tests/utils/setup_test.go index dd908fef9e5..ef191261b5b 100644 --- a/tests/utils/setup_test.go +++ b/tests/utils/setup_test.go @@ -71,7 +71,7 @@ func TestSetupWorkloadIdentityComponents(t *testing.T) { KubeClient = GetKubernetesClient(t) CreateNamespace(t, KubeClient, AzureWorkloadIdentityNamespace) - _, err = ExecuteCommand(fmt.Sprintf("helm upgrade --install workload-identity-webhook azure-workload-identity/workload-identity-webhook --namespace %s --set azureTenantID=%s --set image.release=v0.12.0", + _, err = ExecuteCommand(fmt.Sprintf("helm upgrade --install workload-identity-webhook azure-workload-identity/workload-identity-webhook --namespace %s --set azureTenantID=%s", AzureWorkloadIdentityNamespace, AzureADTenantID)) require.NoErrorf(t, err, "cannot install workload identity webhook - %s", err)