From 8c754dccecc9bf251450a7cb966391007cbfed4b Mon Sep 17 00:00:00 2001 From: ytimocin Date: Tue, 9 Jul 2024 14:50:40 -0700 Subject: [PATCH] Fixing a format issue Signed-off-by: ytimocin --- .../workflows/functional-test-noncloud.yaml | 296 +----------------- .github/workflows/functional-test.yaml | 75 ++--- .github/workflows/long-running-azure.yaml | 10 +- build/test.mk | 2 +- .../cloud/resources/microsoftsql_test.go | 1 + .../cloud/resources/mongodb_test.go | 72 +++++ .../cloud/resources/redis_test.go | 101 ++++++ ...atastoresrp-resources-mongodb-recipe.bicep | 18 +- ...resrp-resources-redis-default-recipe.bicep | 0 .../datastoresrp-resources-redis-recipe.bicep | 12 +- .../noncloud/resources/mongodb_test.go | 46 --- .../noncloud/resources/redis_test.go | 75 ----- ...srp-resources-mongodb-recipe-context.bicep | 83 ----- .../datastoresrp-resources-redis-manual.bicep | 6 +- ...oresrp-resources-simulatedenv-recipe.bicep | 18 +- .../datastoresrp-resources-sqldb-manual.bicep | 2 +- .../datastoresrp-rs-mongodb-manual.bicep | 2 - 17 files changed, 254 insertions(+), 565 deletions(-) create mode 100644 test/functional-portable/datastoresrp/cloud/resources/mongodb_test.go create mode 100644 test/functional-portable/datastoresrp/cloud/resources/redis_test.go rename test/functional-portable/datastoresrp/{noncloud => cloud}/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep (83%) rename test/functional-portable/datastoresrp/{noncloud => cloud}/resources/testdata/datastoresrp-resources-redis-default-recipe.bicep (100%) rename test/functional-portable/datastoresrp/{noncloud => cloud}/resources/testdata/datastoresrp-resources-redis-recipe.bicep (79%) delete mode 100644 test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe-context.bicep diff --git a/.github/workflows/functional-test-noncloud.yaml b/.github/workflows/functional-test-noncloud.yaml index dcf4ab26cca..8555bf92096 100644 --- a/.github/workflows/functional-test-noncloud.yaml +++ b/.github/workflows/functional-test-noncloud.yaml @@ -20,6 +20,7 @@ permissions: id-token: write # Required for requesting the JWT contents: read # Required for listing the commits packages: write # Required for uploading the package + checks: write # Required for creating a check run on: # Enable manual trigger @@ -47,10 +48,6 @@ on: env: # Go version GOVER: "1.22.2" - # Go proxy - GOPROXY: https://proxy.golang.org - # gotestsum version - see: https://github.com/gotestyourself/gotestsum - GOTESTSUM_VER: 1.10.0 # Helm version HELM_VER: "v3.12.0" # KinD cluster version @@ -61,10 +58,6 @@ env: DAPR_DASHBOARD_VER: "0.14.0" # Kubectl version KUBECTL_VER: "v1.25.0" - # Azure Keyvault CSI driver chart version - AZURE_KEYVAULT_CSI_DRIVER_VER: "1.4.2" - # Azure workload identity webhook chart version - AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER: "1.1.0" # Container registry for storing container images CONTAINER_REGISTRY: ghcr.io/radius-project/dev # Container registry for storing Bicep recipe artifacts @@ -79,8 +72,6 @@ env: ACTION_LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" # Server where terraform test modules are deployed TF_RECIPE_MODULE_SERVER_URL: "http://tf-module-server.radius-test-tf-module-server.svc.cluster.local" - # The functional test GitHub app id - FUNCTIONAL_TEST_APP_ID: 425843 # Private Git repository where terraform module for testing is stored. TF_RECIPE_PRIVATE_GIT_SOURCE: "git::https://github.com/radius-project/terraform-private-modules//kubernetes-redis" # The number of failed tests to report. @@ -103,12 +94,6 @@ jobs: DE_IMAGE: ${{ steps.gen-id.outputs.DE_IMAGE }} DE_TAG: ${{ steps.gen-id.outputs.DE_TAG }} steps: - - name: Get GitHub app token - uses: tibdex/github-app-token@v2 - id: get_installation_token - with: - app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} - private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - name: Set up checkout target (scheduled) if: github.event_name == 'schedule' run: | @@ -175,61 +160,12 @@ jobs: echo "PR_NUMBER=${{ env.PR_NUMBER }}" >> $GITHUB_OUTPUT echo "DE_IMAGE=${{ env.DE_IMAGE }}" >> $GITHUB_OUTPUT echo "DE_TAG=${{ env.DE_TAG }}" >> $GITHUB_OUTPUT - - uses: marocchino/sticky-pull-request-comment@v2 - if: env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - hide: true - hide_classify: "OUTDATED" - message: | - ## Radius functional test (non-cloud) overview - - :mag: **[Go to test action run](${{ env.ACTION_LINK }})** - - | Name | Value | - |------|-------| - |**Repository** | ${{ steps.gen-id.outputs.CHECKOUT_REPO }} | - |**Commit ref** | ${{ steps.gen-id.outputs.CHECKOUT_REF }} | - |**Unique ID** | ${{ steps.gen-id.outputs.UNIQUE_ID }} | - |**Image tag** | ${{ steps.gen-id.outputs.REL_VERSION }} | - -
- Click here to see the list of tools in the current test run - - * gotestsum ${{ env.GOTESTSUM_VER }} - * KinD: ${{ env.KIND_VER }} - * Dapr: ${{ env.DAPR_VER }} - * Azure KeyVault CSI driver: ${{ env.AZURE_KEYVAULT_CSI_DRIVER_VER }} - * Azure Workload identity webhook: ${{ env.AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER }} - * Bicep recipe location `${{ env.BICEP_RECIPE_REGISTRY }}/test/testrecipes/test-bicep-recipes/:${{ env.REL_VERSION }}` - * Terraform recipe location `${{ env.TF_RECIPE_MODULE_SERVER_URL }}/.zip` (in cluster) - * applications-rp test image location: `${{ env.CONTAINER_REGISTRY }}/applications-rp:${{ env.REL_VERSION }}` - * controller test image location: `${{ env.CONTAINER_REGISTRY }}/controller:${{ env.REL_VERSION }}` - * ucp test image location: `${{ env.CONTAINER_REGISTRY }}/ucpd:${{ env.REL_VERSION }}` - * deployment-engine test image location: `${{ env.DE_IMAGE }}:${{ env.DE_TAG }}` - -
- - ## Test Status - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: marocchino/sticky-pull-request-comment@v2 - if: env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :hourglass: Building Radius and pushing container images for functional tests... - name: Build and Push container images run: | make build && make docker-build && make docker-push @@ -242,36 +178,6 @@ jobs: name: ${{ steps.gen-id.outputs.RAD_CLI_ARTIFACT_NAME }} path: | ./dist/linux_amd64/release/rad - - uses: marocchino/sticky-pull-request-comment@v2 - if: success() && env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :white_check_mark: Container images build succeeded - - uses: marocchino/sticky-pull-request-comment@v2 - if: failure() && env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :x: Container images build failed - - uses: marocchino/sticky-pull-request-comment@v2 - if: env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :hourglass: Publishing Bicep Recipes for functional tests... - name: Publish Bicep Test Recipes run: | mkdir ./bin @@ -285,26 +191,6 @@ jobs: env: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} - - uses: marocchino/sticky-pull-request-comment@v2 - if: success() && env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :white_check_mark: Recipe publishing succeeded - - uses: marocchino/sticky-pull-request-comment@v2 - if: failure() && env.PR_NUMBER != '' - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :x: Test recipe publishing failed tests: name: Run ${{ matrix.name }} functional tests needs: build @@ -317,12 +203,15 @@ jobs: cli-noncloud, corerp-noncloud, daprrp-noncloud, - datastoresrp-noncloud, kubernetes-noncloud, msgrp-noncloud, samples-noncloud, ucp-noncloud, ] + include: + # datastorerp functional tests need a larger VM. + - os: ubuntu-latest-m + name: datastoresrp-noncloud runs-on: ${{ matrix.os }} env: UNIQUE_ID: ${{ needs.build.outputs.UNIQUE_ID }} @@ -335,21 +224,6 @@ jobs: DE_IMAGE: ${{ needs.build.outputs.DE_IMAGE }} DE_TAG: ${{ needs.build.outputs.DE_TAG }} steps: - - name: Get GitHub app token - uses: tibdex/github-app-token@v2 - id: get_installation_token - with: - app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} - private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v2.0.0 - if: always() - with: - token: ${{ steps.get_installation_token.outputs.token }} - name: "Functional Test Run" - status: in_progress - repo: ${{ github.repository }} - sha: ${{ env.CHECKOUT_REF }} - details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - name: Checkout uses: actions/checkout@v4 with: @@ -357,7 +231,7 @@ jobs: ref: ${{ env.CHECKOUT_REF }} - name: Checkout samples repo uses: actions/checkout@v4 - if: matrix.name == 'samples' + if: matrix.name == 'samples-noncloud' with: repository: radius-project/samples ref: refs/heads/edge @@ -387,21 +261,6 @@ jobs: with: name: ${{ env.RAD_CLI_ARTIFACT_NAME }} path: bin - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_SP_TESTS_APPID }} - tenant-id: ${{ secrets.AZURE_SP_TESTS_TENANTID }} - subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID_TESTS }} - - uses: marocchino/sticky-pull-request-comment@v2 - continue-on-error: true - with: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} - header: teststatus-${{ github.run_id }} - number: ${{ env.PR_NUMBER }} - append: true - message: | - :hourglass: Starting ${{ matrix.name }} functional tests... - uses: azure/setup-helm@v4 with: version: ${{ env.HELM_VER }} @@ -410,54 +269,15 @@ jobs: curl -sSLo "kind" "https://github.com/kubernetes-sigs/kind/releases/download/${{ env.KIND_VER }}/kind-linux-amd64" chmod +x ./kind - # Populate the following environment variables for Azure workload identity from secrets. - # AZURE_OIDC_ISSUER_PUBLIC_KEY - # AZURE_OIDC_ISSUER_PRIVATE_KEY - # AZURE_OIDC_ISSUER - eval "export $(echo "${{ secrets.FUNCTEST_AZURE_OIDC_JSON }}" | jq -r 'to_entries | map("\(.key)=\(.value)") | @sh')" - - AUTHKEY=$(echo -n "${{ github.actor }}:${{ secrets.GH_RAD_CI_BOT_PAT }}" | base64) - echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"${AUTHKEY}\"}}}" > "./ghcr_secret.json" - - # Create KinD cluster with OIDC Issuer keys - echo $AZURE_OIDC_ISSUER_PUBLIC_KEY | base64 -d > sa.pub - echo $AZURE_OIDC_ISSUER_PRIVATE_KEY | base64 -d > sa.key + # Create KinD cluster cat <> $GITHUB_OUTPUT - - uses: LouisBrunner/checks-action@v2.0.0 - if: always() - with: - token: ${{ steps.get_installation_token.outputs.token }} - name: "Functional Test Run" - repo: ${{ github.repository }} - sha: ${{ env.CHECKOUT_REF }} - status: completed - conclusion: ${{ steps.get_test_status.outputs.test_status }} - output: | - {"summary":"Functional Test run completed. See links for more information.","title":"Functional Test Run"} - details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} report-failure: name: Report test failure needs: [build, tests] @@ -712,7 +432,7 @@ jobs: response = await github.rest.actions.listWorkflowRuns({ owner: context.repo.owner, repo: context.repo.repo, - workflow_id: 'functional-test.yaml', + workflow_id: 'functional-test-noncloud.yaml', event: 'schedule', per_page: 10 }); diff --git a/.github/workflows/functional-test.yaml b/.github/workflows/functional-test.yaml index d522955fe5a..36af7ed52a7 100644 --- a/.github/workflows/functional-test.yaml +++ b/.github/workflows/functional-test.yaml @@ -4,7 +4,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -18,8 +18,9 @@ name: Functional tests permissions: id-token: write # Required for requesting the JWT - contents: read # Required for listing the commits + contents: read # Required for listing the commits packages: write # Required for uploading the package + checks: write # Required for creating a check run on: # Enable manual trigger @@ -33,31 +34,31 @@ on: repository_dispatch: types: [de-functional-test] workflow_run: - workflows: ['Approve Functional Tests'] + workflows: ["Approve Functional Tests"] types: - completed env: # Go version - GOVER: '1.22.2' + GOVER: "1.22.2" GOPROXY: https://proxy.golang.org # gotestsum version - see: https://github.com/gotestyourself/gotestsum - GOTESTSUM_VER: 1.10.0 + GOTESTSUM_VER: 1.12.0 # Helm version - HELM_VER: 'v3.12.0' + HELM_VER: "v3.12.0" # KinD cluster version - KIND_VER: 'v0.20.0' + KIND_VER: "v0.20.0" # Dapr version - DAPR_VER: '1.12.0' - DAPR_DASHBOARD_VER: '0.14.0' + DAPR_VER: "1.12.0" + DAPR_DASHBOARD_VER: "0.14.0" # Kubectl version - KUBECTL_VER: 'v1.25.0' + KUBECTL_VER: "v1.25.0" # Azure Keyvault CSI driver chart version - AZURE_KEYVAULT_CSI_DRIVER_VER: '1.4.2' + AZURE_KEYVAULT_CSI_DRIVER_VER: "1.4.2" # Azure workload identity webhook chart version - AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER: '1.1.0' + AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER: "1.1.0" # Container registry for storing container images CONTAINER_REGISTRY: ghcr.io/radius-project/dev # Container registry for storing Bicep recipe artifacts @@ -71,11 +72,11 @@ env: # The Radius helm chart location. RADIUS_CHART_LOCATION: deploy/Chart/ # The region for AWS resources - AWS_REGION: 'us-west-2' + AWS_REGION: "us-west-2" # The AWS account ID - AWS_ACCOUNT_ID: '${{ secrets.FUNCTEST_AWS_ACCOUNT_ID }}' + AWS_ACCOUNT_ID: "${{ secrets.FUNCTEST_AWS_ACCOUNT_ID }}" # The current GitHub action link - ACTION_LINK: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + ACTION_LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" # Server where terraform test modules are deployed TF_RECIPE_MODULE_SERVER_URL: "http://tf-module-server.radius-test-tf-module-server.svc.cluster.local" # The functional test GitHub app id @@ -91,8 +92,8 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'repository_dispatch' || (github.event_name == 'schedule' && github.repository == 'radius-project/radius') || github.event_name == 'workflow_run' env: - DE_IMAGE: 'ghcr.io/radius-project/deployment-engine' - DE_TAG: 'latest' + DE_IMAGE: "ghcr.io/radius-project/deployment-engine" + DE_TAG: "latest" outputs: REL_VERSION: ${{ steps.gen-id.outputs.REL_VERSION }} UNIQUE_ID: ${{ steps.gen-id.outputs.UNIQUE_ID }} @@ -106,7 +107,7 @@ jobs: - name: Get GitHub app token uses: tibdex/github-app-token@v2 id: get_installation_token - with: + with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - name: Set up checkout target (scheduled) @@ -117,16 +118,16 @@ jobs: - name: Set up checkout target (pull_request) if: github.event_name == 'pull_request' run: | - echo "CHECKOUT_REPO=${{ github.repository }}" >> $GITHUB_ENV - echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV - echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + echo "CHECKOUT_REPO=${{ github.repository }}" >> $GITHUB_ENV + echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV + echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV - name: Use custom actions uses: actions/checkout@v4 - - name: 'Download PR data artifacts' + - name: "Download PR data artifacts" if: github.event_name == 'workflow_run' uses: ./.github/actions/download-pr-data-artifact id: get-pr-number - - name: 'Set PR context (workflow_run)' + - name: "Set PR context (workflow_run)" if: github.event_name == 'workflow_run' uses: actions/github-script@v7 with: @@ -175,7 +176,7 @@ jobs: fi UNIQUE_ID=func$(echo $BASE_STR | sha1sum | head -c 10) echo "REL_VERSION=pr-${UNIQUE_ID}" >> $GITHUB_ENV - + # Set output variables to be used in the other jobs echo "REL_VERSION=pr-${UNIQUE_ID}" >> $GITHUB_OUTPUT echo "UNIQUE_ID=${UNIQUE_ID}" >> $GITHUB_OUTPUT @@ -194,7 +195,7 @@ jobs: header: teststatus-${{ github.run_id }} number: ${{ env.PR_NUMBER }} hide: true - hide_classify: 'OUTDATED' + hide_classify: "OUTDATED" message: | ## Radius functional test overview @@ -223,7 +224,7 @@ jobs: * deployment-engine test image location: `${{ env.DE_IMAGE }}:${{ env.DE_TAG }}` - + ## Test Status - name: Login to GitHub Container Registry uses: docker/login-action@v3 @@ -345,14 +346,14 @@ jobs: - name: Get GitHub app token uses: tibdex/github-app-token@v2 id: get_installation_token - with: + with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v2.0.0 if: always() with: token: ${{ steps.get_installation_token.outputs.token }} - name: 'Functional Test Run' + name: "Functional Test Run" status: in_progress repo: ${{ github.repository }} sha: ${{ env.CHECKOUT_REF }} @@ -577,15 +578,15 @@ jobs: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.BICEP_RECIPE_TAG_VERSION }} GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} - GOTESTSUM_OPTS: '--junitfile ./dist/functional_test/results.xml' + GOTESTSUM_OPTS: "--junitfile ./dist/functional_test/results.xml" - name: Process Functional Test Results uses: ./.github/actions/process-test-results # In case of failure, upload functional_test_results to artifacts so that they are not erased by subsequent runs. if: failure() && github.repository == 'radius-project/radius' with: - test_group_name: 'Functional Tests - ${{ matrix.name }}' - artifact_name: 'functional_test_results_${{ matrix.name }}' - result_directory: 'dist/functional_test/' + test_group_name: "Functional Tests - ${{ matrix.name }}" + artifact_name: "functional_test_results_${{ matrix.name }}" + result_directory: "dist/functional_test/" - uses: azure/setup-kubectl@v4 if: always() with: @@ -620,7 +621,7 @@ jobs: echo "Pod logs saved to recipes/pod-logs/" # Get kubernetes events and save to file kubectl get events -n $namespace > recipes/pod-logs/events.txt - - name: Upload Terraform recipe publishing logs + - name: Upload Terraform recipe publishing logs uses: actions/upload-artifact@v4 if: always() with: @@ -676,7 +677,7 @@ jobs: - name: Get GitHub app token uses: tibdex/github-app-token@v2 id: get_installation_token - with: + with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - name: Get tests job status @@ -703,7 +704,7 @@ jobs: if: always() with: token: ${{ steps.get_installation_token.outputs.token }} - name: 'Functional Test Run' + name: "Functional Test Run" repo: ${{ github.repository }} sha: ${{ env.CHECKOUT_REF }} status: completed @@ -729,7 +730,7 @@ jobs: event: 'schedule', per_page: 10 }); - + failureCount = 1; for (const run of response.data.workflow_runs) { if (run.conclusion === 'failure') { @@ -751,4 +752,4 @@ jobs: title: `Scheduled functional test failed - Run ID: ${context.runId}`, labels: ['bug', 'test-failure'], body: `## Bug information \n\nThis bug is generated automatically if the scheduled functional test fails at least ${process.env.ISSUE_CREATE_THRESHOLD} times in a row. The Radius functional test operates on a schedule of every 4 hours during weekdays and every 12 hours over the weekend. It's important to understand that the test may fail due to workflow infrastructure issues, like network problems, rather than the flakiness of the test itself. For the further investigation, please visit [here](${process.env.ACTION_LINK}).` - }) \ No newline at end of file + }) diff --git a/.github/workflows/long-running-azure.yaml b/.github/workflows/long-running-azure.yaml index 93cbd797a78..77743093840 100644 --- a/.github/workflows/long-running-azure.yaml +++ b/.github/workflows/long-running-azure.yaml @@ -34,13 +34,13 @@ # the previous build is still valid. If valid, the workflow skips the build steps # and uses the cached 'rad cli' for testing. # -# Grafana dashboard URL: https://radlrtest00-dashboard-e4ffc0cwggchdhba.wus3.grafana.azure.com +# Grafana dashboard URL: https://radlrtest00-dashboard-e4ffc0cwggchdhba.wus3.grafana.azure.com name: Long-running test on Azure permissions: id-token: write # Required for requesting the JWT - contents: read # Required for actions/checkout + contents: read # Required for actions/checkout packages: write # Required for uploading the package on: @@ -56,7 +56,7 @@ env: GOPROXY: https://proxy.golang.org # gotestsum version - see: https://github.com/gotestyourself/gotestsum - GOTESTSUM_VER: 1.10.0 + GOTESTSUM_VER: 1.12.0 # Container registry for storing container images CONTAINER_REGISTRY: ghcr.io/radius-project/dev @@ -313,7 +313,7 @@ jobs: - name: Get GitHub app token uses: tibdex/github-app-token@v2 id: get_installation_token - with: + with: app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }} private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }} - name: Checkout @@ -534,7 +534,7 @@ jobs: event: 'schedule', per_page: 10 }); - + failureCount = 1; for (const run of response.data.workflow_runs) { if (run.conclusion === 'failure') { diff --git a/build/test.mk b/build/test.mk index 06eca889e16..7db7d8e82c6 100644 --- a/build/test.mk +++ b/build/test.mk @@ -101,7 +101,7 @@ test-functional-cli-noncloud: ## Runs cli functional tests that do not require c test-functional-daprrp: test-functional-daprrp-noncloud ## Runs all Dapr RP functional tests (both cloud and non-cloud) test-functional-daprrp-noncloud: ## Runs Dapr RP functional tests that do not require cloud resources -CGO_ENABLED=1 $(GOTEST_TOOL) ./test/functional-portable/daprrp/noncloud/... -timeout ${TEST_TIMEOUT} -v -parallel 3 $(GOTEST_OPTS) + CGO_ENABLED=1 $(GOTEST_TOOL) ./test/functional-portable/daprrp/noncloud/... -timeout ${TEST_TIMEOUT} -v -parallel 3 $(GOTEST_OPTS) test-functional-datastoresrp: test-functional-datastoresrp-noncloud test-functional-datastoresrp-cloud ## Runs all Datastores RP functional tests (non-cloud and cloud) diff --git a/test/functional-portable/datastoresrp/cloud/resources/microsoftsql_test.go b/test/functional-portable/datastoresrp/cloud/resources/microsoftsql_test.go index 1b836fc42a4..57ad918316f 100644 --- a/test/functional-portable/datastoresrp/cloud/resources/microsoftsql_test.go +++ b/test/functional-portable/datastoresrp/cloud/resources/microsoftsql_test.go @@ -44,6 +44,7 @@ func Test_MicrosoftSQL_Manual(t *testing.T) { } else { t.Error("AZURE_MSSQL_USERNAME and AZURE_MSSQL_PASSWORD environment variable must be set to run this test.") } + mssqlresourceid := "mssqlresourceid=" + os.Getenv("AZURE_MSSQL_RESOURCE_ID") sqlDatabse := "database=" + os.Getenv("AZURE_MSSQL_DATABASE") sqlServer := "server=" + os.Getenv("AZURE_MSSQL_SERVER") diff --git a/test/functional-portable/datastoresrp/cloud/resources/mongodb_test.go b/test/functional-portable/datastoresrp/cloud/resources/mongodb_test.go new file mode 100644 index 00000000000..b176975655b --- /dev/null +++ b/test/functional-portable/datastoresrp/cloud/resources/mongodb_test.go @@ -0,0 +1,72 @@ +/* +Copyright 2023 The Radius Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource_test + +import ( + "testing" + + "github.com/radius-project/radius/test/rp" + "github.com/radius-project/radius/test/step" + "github.com/radius-project/radius/test/testutil" + "github.com/radius-project/radius/test/validation" +) + +// Test_MongoDB_Recipe validates: +// the creation of a mongoDB from a recipe that uses an Azure resource +func Test_MongoDB_Recipe(t *testing.T) { + template := "testdata/datastoresrp-resources-mongodb-recipe.bicep" + name := "dsrp-resources-mongodb-recipe" + appNamespace := "dsrp-resources-mongodb-recipe-app" + + test := rp.NewRPTest(t, name, []rp.TestStep{ + { + Executor: step.NewDeployExecutor(template, testutil.GetMagpieImage(), testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + RPResources: &validation.RPResourceSet{ + Resources: []validation.RPResource{ + { + Name: "dsrp-resources-mongodb-recipe-env", + Type: validation.EnvironmentsResource, + }, + { + Name: "dsrp-resources-mongodb-recipe", + Type: validation.ApplicationsResource, + App: name, + }, + { + Name: "mongodb-app-ctnr", + Type: validation.ContainersResource, + App: name, + }, + { + Name: "mongodb-db", + Type: validation.MongoDatabasesResource, + App: name, + }, + }, + }, + K8sObjects: &validation.K8sObjectSet{ + Namespaces: map[string][]validation.K8sObject{ + appNamespace: { + validation.NewK8sPodForResource(name, "mongodb-app-ctnr").ValidateLabels(false), + }, + }, + }, + }, + }) + + test.Test(t) +} diff --git a/test/functional-portable/datastoresrp/cloud/resources/redis_test.go b/test/functional-portable/datastoresrp/cloud/resources/redis_test.go new file mode 100644 index 00000000000..ffeb6b8eb51 --- /dev/null +++ b/test/functional-portable/datastoresrp/cloud/resources/redis_test.go @@ -0,0 +1,101 @@ +/* +Copyright 2023 The Radius Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource_test + +import ( + "context" + "strings" + "testing" + + "github.com/radius-project/radius/test/rp" + "github.com/radius-project/radius/test/step" + "github.com/radius-project/radius/test/testutil" + "github.com/radius-project/radius/test/validation" + "github.com/stretchr/testify/require" +) + +func Test_Redis_Recipe(t *testing.T) { + template := "testdata/datastoresrp-resources-redis-recipe.bicep" + name := "dsrp-resources-redis-recipe" + + test := rp.NewRPTest(t, name, []rp.TestStep{ + { + Executor: step.NewDeployExecutor(template, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + RPResources: &validation.RPResourceSet{ + Resources: []validation.RPResource{ + { + Name: "dsrp-resources-env-recipe-env", + Type: validation.EnvironmentsResource, + }, + { + Name: name, + Type: validation.ApplicationsResource, + }, + { + Name: "rds-recipe", + Type: validation.RedisCachesResource, + App: name, + }, + }, + }, + SkipObjectValidation: true, + PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { + redis, err := test.Options.ManagementClient.GetResource(ctx, "Applications.Datastores/redisCaches", "rds-recipe") + require.NoError(t, err) + require.NotNil(t, redis) + status := redis.Properties["status"].(map[string]any) + recipe := status["recipe"].(map[string]interface{}) + require.Equal(t, "bicep", recipe["templateKind"].(string)) + templatePath := strings.Split(recipe["templatePath"].(string), ":")[0] + require.Equal(t, "ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/redis-recipe-value-backed", templatePath) + }, + }, + }) + + test.Test(t) +} + +func Test_Redis_DefaultRecipe(t *testing.T) { + template := "testdata/datastoresrp-resources-redis-default-recipe.bicep" + name := "dsrp-resources-redis-default-recipe" + + test := rp.NewRPTest(t, name, []rp.TestStep{ + { + Executor: step.NewDeployExecutor(template, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), + RPResources: &validation.RPResourceSet{ + Resources: []validation.RPResource{ + { + Name: "dsrp-resources-env-default-recipe-env", + Type: validation.EnvironmentsResource, + }, + { + Name: name, + Type: validation.ApplicationsResource, + }, + { + Name: "rds-default-recipe", + Type: validation.RedisCachesResource, + App: name, + }, + }, + }, + SkipObjectValidation: true, + }, + }) + + test.Test(t) +} diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep b/test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep similarity index 83% rename from test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep rename to test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep index ccdc10dd632..8495e68ef45 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep +++ b/test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-mongodb-recipe.bicep @@ -4,11 +4,11 @@ param rg string = resourceGroup().name param sub string = subscription().subscriptionId -param registry string +param registry string param version string -param magpieimage string +param magpieimage string resource env 'Applications.Core/environments@2023-10-01-preview' = { name: 'dsrp-resources-mongodb-recipe-env' @@ -25,10 +25,10 @@ resource env 'Applications.Core/environments@2023-10-01-preview' = { } } recipes: { - 'Applications.Datastores/mongoDatabases':{ + 'Applications.Datastores/mongoDatabases': { mongoazure: { templateKind: 'bicep' - templatePath: '${registry}/test/testrecipes/test-bicep-recipes/mongodb-recipe-kubernetes:${version}' + templatePath: '${registry}/test/testrecipes/test-bicep-recipes/mongodb-recipe-kubernetes:${version}' } } } @@ -42,8 +42,8 @@ resource app 'Applications.Core/applications@2023-10-01-preview' = { environment: env.id extensions: [ { - kind: 'kubernetesNamespace' - namespace: 'dsrp-resources-mongodb-recipe-app' + kind: 'kubernetesNamespace' + namespace: 'dsrp-resources-mongodb-recipe-app' } ] } @@ -64,9 +64,9 @@ resource webapp 'Applications.Core/containers@2023-10-01-preview' = { env: { DBCONNECTION: recipedb.connectionString() } - readinessProbe:{ - kind:'httpGet' - containerPort:3000 + readinessProbe: { + kind: 'httpGet' + containerPort: 3000 path: '/healthz' } } diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-default-recipe.bicep b/test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-redis-default-recipe.bicep similarity index 100% rename from test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-default-recipe.bicep rename to test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-redis-default-recipe.bicep diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep b/test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep similarity index 79% rename from test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep rename to test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep index 99304a666aa..a97261e63f7 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep +++ b/test/functional-portable/datastoresrp/cloud/resources/testdata/datastoresrp-resources-redis-recipe.bicep @@ -2,7 +2,7 @@ import radius as radius param scope string = resourceGroup().id -param registry string +param registry string param version string @@ -13,7 +13,7 @@ resource env 'Applications.Core/environments@2023-10-01-preview' = { compute: { kind: 'kubernetes' resourceId: 'self' - namespace: 'dsrp-resources-env-recipe-env' + namespace: 'dsrp-resources-env-recipe-env' } providers: { azure: { @@ -21,10 +21,10 @@ resource env 'Applications.Core/environments@2023-10-01-preview' = { } } recipes: { - 'Applications.Datastores/redisCaches':{ + 'Applications.Datastores/redisCaches': { rediscache: { templateKind: 'bicep' - templatePath: '${registry}/test/testrecipes/test-bicep-recipes/redis-recipe-value-backed:${version}' + templatePath: '${registry}/test/testrecipes/test-bicep-recipes/redis-recipe-value-backed:${version}' } } } @@ -38,8 +38,8 @@ resource app 'Applications.Core/applications@2023-10-01-preview' = { environment: env.id extensions: [ { - kind: 'kubernetesNamespace' - namespace: 'dsrp-resources-redis-recipe-app' + kind: 'kubernetesNamespace' + namespace: 'dsrp-resources-redis-recipe-app' } ] } diff --git a/test/functional-portable/datastoresrp/noncloud/resources/mongodb_test.go b/test/functional-portable/datastoresrp/noncloud/resources/mongodb_test.go index ee4a8de6702..cd9c8d67c42 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/mongodb_test.go +++ b/test/functional-portable/datastoresrp/noncloud/resources/mongodb_test.go @@ -70,49 +70,3 @@ func Test_MongoDB_Manual(t *testing.T) { test.Test(t) } - -// Test_MongoDB_Recipe validates: -// the creation of a mongoDB from a recipe that uses an Azure resource -func Test_MongoDB_Recipe(t *testing.T) { - template := "testdata/datastoresrp-resources-mongodb-recipe.bicep" - name := "dsrp-resources-mongodb-recipe" - appNamespace := "dsrp-resources-mongodb-recipe-app" - - test := rp.NewRPTest(t, name, []rp.TestStep{ - { - Executor: step.NewDeployExecutor(template, testutil.GetMagpieImage(), testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), - RPResources: &validation.RPResourceSet{ - Resources: []validation.RPResource{ - { - Name: "dsrp-resources-mongodb-recipe-env", - Type: validation.EnvironmentsResource, - }, - { - Name: "dsrp-resources-mongodb-recipe", - Type: validation.ApplicationsResource, - App: name, - }, - { - Name: "mongodb-app-ctnr", - Type: validation.ContainersResource, - App: name, - }, - { - Name: "mongodb-db", - Type: validation.MongoDatabasesResource, - App: name, - }, - }, - }, - K8sObjects: &validation.K8sObjectSet{ - Namespaces: map[string][]validation.K8sObject{ - appNamespace: { - validation.NewK8sPodForResource(name, "mongodb-app-ctnr").ValidateLabels(false), - }, - }, - }, - }, - }) - - test.Test(t) -} diff --git a/test/functional-portable/datastoresrp/noncloud/resources/redis_test.go b/test/functional-portable/datastoresrp/noncloud/resources/redis_test.go index 45acdfc99fb..4f672d25308 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/redis_test.go +++ b/test/functional-portable/datastoresrp/noncloud/resources/redis_test.go @@ -17,15 +17,12 @@ limitations under the License. package resource_test import ( - "context" - "strings" "testing" "github.com/radius-project/radius/test/rp" "github.com/radius-project/radius/test/step" "github.com/radius-project/radius/test/testutil" "github.com/radius-project/radius/test/validation" - "github.com/stretchr/testify/require" ) func Test_Redis_Manual(t *testing.T) { @@ -72,75 +69,3 @@ func Test_Redis_Manual(t *testing.T) { test.Test(t) } - -func Test_Redis_Recipe(t *testing.T) { - template := "testdata/datastoresrp-resources-redis-recipe.bicep" - name := "dsrp-resources-redis-recipe" - - test := rp.NewRPTest(t, name, []rp.TestStep{ - { - Executor: step.NewDeployExecutor(template, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), - RPResources: &validation.RPResourceSet{ - Resources: []validation.RPResource{ - { - Name: "dsrp-resources-env-recipe-env", - Type: validation.EnvironmentsResource, - }, - { - Name: name, - Type: validation.ApplicationsResource, - }, - { - Name: "rds-recipe", - Type: validation.RedisCachesResource, - App: name, - }, - }, - }, - SkipObjectValidation: true, - PostStepVerify: func(ctx context.Context, t *testing.T, test rp.RPTest) { - redis, err := test.Options.ManagementClient.GetResource(ctx, "Applications.Datastores/redisCaches", "rds-recipe") - require.NoError(t, err) - require.NotNil(t, redis) - status := redis.Properties["status"].(map[string]any) - recipe := status["recipe"].(map[string]interface{}) - require.Equal(t, "bicep", recipe["templateKind"].(string)) - templatePath := strings.Split(recipe["templatePath"].(string), ":")[0] - require.Equal(t, "ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/redis-recipe-value-backed", templatePath) - }, - }, - }) - - test.Test(t) -} - -func Test_Redis_DefaultRecipe(t *testing.T) { - template := "testdata/datastoresrp-resources-redis-default-recipe.bicep" - name := "dsrp-resources-redis-default-recipe" - - test := rp.NewRPTest(t, name, []rp.TestStep{ - { - Executor: step.NewDeployExecutor(template, testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), - RPResources: &validation.RPResourceSet{ - Resources: []validation.RPResource{ - { - Name: "dsrp-resources-env-default-recipe-env", - Type: validation.EnvironmentsResource, - }, - { - Name: name, - Type: validation.ApplicationsResource, - }, - { - Name: "rds-default-recipe", - Type: validation.RedisCachesResource, - App: name, - }, - }, - }, - SkipObjectValidation: true, - }, - }) - - test.Test(t) -} diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe-context.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe-context.bicep deleted file mode 100644 index 5c7a0ef04d5..00000000000 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-mongodb-recipe-context.bicep +++ /dev/null @@ -1,83 +0,0 @@ -import radius as radius - -param rg string = resourceGroup().name - -param sub string = subscription().subscriptionId - -param registry string - -param version string - -param magpieimage string - -resource env 'Applications.Core/environments@2023-10-01-preview' = { - name: 'dsrp-resources-env-recipes-context-env' - location: 'global' - properties: { - compute: { - kind: 'kubernetes' - resourceId: 'self' - namespace: 'dsrp-resources-env-recipes-context-env' - } - providers: { - azure: { - scope: '/subscriptions/${sub}/resourceGroups/${rg}' - } - } - recipes: { - 'Applications.Datastores/mongoDatabases':{ - default: { - templateKind: 'bicep' - templatePath: '${registry}/test/testrecipes/test-bicep-recipes/mongodb-recipe-context:${version}' - } - } - } - } -} - -resource app 'Applications.Core/applications@2023-10-01-preview' = { - name: 'dsrp-resources-mongodb-recipe-context' - location: 'global' - properties: { - environment: env.id - extensions: [ - { - kind: 'kubernetesNamespace' - namespace: 'dsrp-resources-mongodb-recipe-context-app' - } - ] - } -} - -resource webapp 'Applications.Core/containers@2023-10-01-preview' = { - name: 'mdb-ctx-ctnr' - location: 'global' - properties: { - application: app.id - connections: { - mongodb: { - source: recipedb.id - } - } - container: { - image: magpieimage - env: { - DBCONNECTION: recipedb.connectionString() - } - readinessProbe:{ - kind:'httpGet' - containerPort:3000 - path: '/healthz' - } - } - } -} - -resource recipedb 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = { - name: 'mdb-ctx' - location: 'global' - properties: { - application: app.id - environment: env.id - } -} diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-manual.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-manual.bicep index 6153c746ae8..dc759689284 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-manual.bicep +++ b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-redis-manual.bicep @@ -3,10 +3,10 @@ import radius as radius param magpieimage string param environment string -resource app 'Applications.Core/applications@2023-10-01-preview' = { +resource app 'Applications.Core/applications@2023-10-01-preview' = { name: 'dsrp-resources-redis-manual' location: 'global' - properties:{ + properties: { environment: environment } } @@ -21,7 +21,7 @@ resource webapp 'Applications.Core/containers@2023-10-01-preview' = { env: { DBCONNECTION: redis.connectionString() } - readinessProbe:{ + readinessProbe: { kind: 'httpGet' containerPort: 3000 path: '/healthz' diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-simulatedenv-recipe.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-simulatedenv-recipe.bicep index b590629c858..8b8e867ed51 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-simulatedenv-recipe.bicep +++ b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-simulatedenv-recipe.bicep @@ -1,10 +1,10 @@ import radius as radius -param registry string +param registry string param version string -param magpieimage string +param magpieimage string resource env 'Applications.Core/environments@2023-10-01-preview' = { name: 'dsrp-resources-simenv-recipe-env' @@ -16,10 +16,10 @@ resource env 'Applications.Core/environments@2023-10-01-preview' = { namespace: 'dsrp-resources-simenv-recipe-env' } recipes: { - 'Applications.Datastores/mongoDatabases':{ + 'Applications.Datastores/mongoDatabases': { 'mongodb-recipe-kubernetes': { templateKind: 'bicep' - templatePath: '${registry}/test/testrecipes/test-bicep-recipes/mongodb-recipe-kubernetes:${version}' + templatePath: '${registry}/test/testrecipes/test-bicep-recipes/mongodb-recipe-kubernetes:${version}' } } } @@ -34,8 +34,8 @@ resource app 'Applications.Core/applications@2023-10-01-preview' = { environment: env.id extensions: [ { - kind: 'kubernetesNamespace' - namespace: 'dsrp-resources-simenv-recipe-app' + kind: 'kubernetesNamespace' + namespace: 'dsrp-resources-simenv-recipe-app' } ] } @@ -56,9 +56,9 @@ resource webapp 'Applications.Core/containers@2023-10-01-preview' = { env: { DBCONNECTION: recipedb.connectionString() } - readinessProbe:{ - kind:'httpGet' - containerPort:3000 + readinessProbe: { + kind: 'httpGet' + containerPort: 3000 path: '/healthz' } } diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep index e02020b0d8b..fdcb0bcefb9 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep +++ b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep @@ -68,7 +68,7 @@ resource db 'Applications.Datastores/sqlDatabases@2023-10-01-preview' = { resourceProvisioning: 'manual' port: sqlPort username: username - secrets:{ + secrets: { password: password } } diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-rs-mongodb-manual.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-rs-mongodb-manual.bicep index 857af3ae122..3f472f87e91 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-rs-mongodb-manual.bicep +++ b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-rs-mongodb-manual.bicep @@ -35,8 +35,6 @@ resource webapp 'Applications.Core/containers@2023-10-01-preview' = { } } - -// https://hub.docker.com/_/mongo/ resource mongoContainer 'Applications.Core/containers@2023-10-01-preview' = { name: 'mdb-us-ctnr' location: 'global'