diff --git a/.github/workflows/pr-e2e.yml b/.github/workflows/pr-e2e.yml index 656f937d24c..662b325be18 100644 --- a/.github/workflows/pr-e2e.yml +++ b/.github/workflows/pr-e2e.yml @@ -122,52 +122,16 @@ 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_REGION: ${{ secrets.AWS_REGION }} - 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_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 }}" @@ -183,11 +147,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/static-analysis-codeql.yml b/.github/workflows/static-analysis-codeql.yml new file mode 100644 index 00000000000..0e68f3c43b8 --- /dev/null +++ b/.github/workflows/static-analysis-codeql.yml @@ -0,0 +1,33 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: {} + +jobs: + codeQl: + name: Analyze CodeQL Go + runs-on: ubuntu-latest + container: ghcr.io/kedacore/build-tools:1.19.5 + if: (github.actor != 'dependabot[bot]') + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Register workspace path + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:go" diff --git a/.github/workflows/static-analysis-semgrep.yml b/.github/workflows/static-analysis-semgrep.yml new file mode 100644 index 00000000000..066efe3d480 --- /dev/null +++ b/.github/workflows/static-analysis-semgrep.yml @@ -0,0 +1,37 @@ +name: "Semgrep" + +on: + push: + branches: [ "main" ] + pull_request_target: {} + +jobs: + semgrep: + name: Analyze Semgrep + runs-on: ubuntu-latest + container: returntocorp/semgrep + if: (github.actor != 'dependabot[bot]') + steps: + - uses: actions/checkout@v3 + - name: Register workspace path + if: ${{ github.event.number > 0 }} + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Checkout Pull Request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: checkout + if: ${{ github.event.number > 0 }} + run: | + apk add github-cli + gh pr checkout ${{ github.event.number }} + + - run: semgrep ci --sarif --output=semgrep.sarif + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} + + - name: Upload SARIF file for GitHub Advanced Security Dashboard + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: semgrep.sarif + if: ${{ github.event.number == '' && !cancelled() }} diff --git a/.github/workflows/v1-build.yml b/.github/workflows/v1-build.yml index 5347a26e034..b020792badf 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/CHANGELOG.md b/CHANGELOG.md index f9c90c122c4..85cb0c4050b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ To learn more about our roadmap, we recommend reading [this document](ROADMAP.md ### Other -- TODO ([#XXX](https://github.com/kedacore/keda/issue/XXX)) +- **General:** Review CodeQL rules and enable it on PRs ([#4032](https://github.com/kedacore/keda/pull/4032)) ## v2.8.1 diff --git a/Makefile b/Makefile index 164c0220a8b..9b2f8d9e7ed 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,7 +252,7 @@ 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 # 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 23c6f3385e3..2532b909413 100644 --- a/tests/.env +++ b/tests/.env @@ -1,27 +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_KEYVAULT_URI= -AZURE_LOG_ANALYTICS_WORKSPACE_ID= -AZURE_RESOURCE_GROUP= -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 ea6e0f2b042..ece4b88ac8c 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: @@ -193,3 +193,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 61a3a93bdc0..f403a82f837 100644 --- a/tests/helper/helper.go +++ b/tests/helper/helper.go @@ -45,7 +45,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") ) diff --git a/tests/run-all.sh b/tests/run-all.sh index e09208c9dc6..63ee7f510c6 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_cloudwatch/aws_cloudwatch_test.go b/tests/scalers/aws_cloudwatch/aws_cloudwatch_test.go index cbf76ab5cdf..ecbbd856c97 100644 --- a/tests/scalers/aws_cloudwatch/aws_cloudwatch_test.go +++ b/tests/scalers/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_cloudwatch_expression/aws_cloudwatch_expression_test.go b/tests/scalers/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go index 5e4f4846636..cfc2d3edbb2 100644 --- a/tests/scalers/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go +++ b/tests/scalers/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_dynamodb/aws_dynamodb_test.go b/tests/scalers/aws_dynamodb/aws_dynamodb_test.go index 4744e466ebd..3d9f6f641df 100644 --- a/tests/scalers/aws_dynamodb/aws_dynamodb_test.go +++ b/tests/scalers/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_dynamodb_streams/aws_dynamodb_streams_test.go b/tests/scalers/aws_dynamodb_streams/aws_dynamodb_streams_test.go index fee129f9dc9..a284b382e06 100644 --- a/tests/scalers/aws_dynamodb_streams/aws_dynamodb_streams_test.go +++ b/tests/scalers/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_kinesis_stream/aws_kinesis_stream_test.go b/tests/scalers/aws_kinesis_stream/aws_kinesis_stream_test.go index 5fe20f6dcf2..f24f00432d8 100644 --- a/tests/scalers/aws_kinesis_stream/aws_kinesis_stream_test.go +++ b/tests/scalers/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_sqs_queue/aws_sqs_queue_test.go b/tests/scalers/aws_sqs_queue/aws_sqs_queue_test.go index 6a81a322645..ee053ef4eab 100644 --- a/tests/scalers/aws_sqs_queue/aws_sqs_queue_test.go +++ b/tests/scalers/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/azure_application_insights/azure_application_insights_test.go b/tests/scalers/azure_application_insights/azure_application_insights_test.go index 7d232b06c51..6c8c8a1773f 100644 --- a/tests/scalers/azure_application_insights/azure_application_insights_test.go +++ b/tests/scalers/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_blob/azure_blob_test.go b/tests/scalers/azure_blob/azure_blob_test.go index adb35ccae83..b900c37fe23 100644 --- a/tests/scalers/azure_blob/azure_blob_test.go +++ b/tests/scalers/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_data_explorer/azure_data_explorer_test.go b/tests/scalers/azure_data_explorer/azure_data_explorer_test.go index f7601166d3e..f07f03a2e6a 100644 --- a/tests/scalers/azure_data_explorer/azure_data_explorer_test.go +++ b/tests/scalers/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_log_analytics/azure_log_analytics_test.go b/tests/scalers/azure_log_analytics/azure_log_analytics_test.go index 677cce94c5f..5b143600896 100644 --- a/tests/scalers/azure_log_analytics/azure_log_analytics_test.go +++ b/tests/scalers/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_queue/azure_queue_test.go b/tests/scalers/azure_queue/azure_queue_test.go index fae562f6e7b..52eb2e47dd9 100644 --- a/tests/scalers/azure_queue/azure_queue_test.go +++ b/tests/scalers/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_service_bus_queue/azure_service_bus_queue_test.go b/tests/scalers/azure_service_bus_queue/azure_service_bus_queue_test.go index 6c07a5415ec..0859b60a320 100644 --- a/tests/scalers/azure_service_bus_queue/azure_service_bus_queue_test.go +++ b/tests/scalers/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") sbQueueManager, sbQueue := setupServiceBusQueue(t) diff --git a/tests/scalers/azure_service_bus_topic/azure_service_bus_topic_test.go b/tests/scalers/azure_service_bus_topic/azure_service_bus_topic_test.go index 2f4fd90d4e0..a9d5059a23e 100644 --- a/tests/scalers/azure_service_bus_topic/azure_service_bus_topic_test.go +++ b/tests/scalers/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") sbTopicManager, sbTopic, sbSubscription := 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 f0e6543c026..ea6197ead93 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_workload_identity/azure_workload_identity_test.go b/tests/secret-providers/azure_workload_identity/azure_workload_identity_test.go index 715278e8488..007d773b454 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") sbNamespace, sbQueueManager, sbQueue := 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 ccb5c33a4e1..2ee10445ed1 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") sbNamespace, sbQueueManager, sbQueue := 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 46cfe831029..b7aa3888c2a 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)