diff --git a/.github/workflows/cloud-database-tests.yml b/.github/workflows/cloud-database-tests.yml index e692c343e8..806dd48e41 100644 --- a/.github/workflows/cloud-database-tests.yml +++ b/.github/workflows/cloud-database-tests.yml @@ -3,10 +3,33 @@ on: schedule: - cron: '17 3 * * *' workflow_call: + inputs: + image-tag: + description: Image tag + required: true + type: string + registry: + description: Image registry, docker or ghcr + required: false + type: string + default: docker workflow_dispatch: inputs: + image-tag: + description: Image tag + required: false + type: string + default: 'latest' + registry: + description: Image registry + required: false + type: choice + default: docker + options: + - docker + - ghcr target: - description: Which managed database to test against + description: Database target required: true default: all type: choice @@ -16,6 +39,8 @@ on: - azure-postgresql - aurora-postgresql - rds-sqlserver + - local-postgresql + - local-ravendb env: DOTNET_NOLOGO: true # Its own region rather than the AWS_REGION secret the SQS tests use: that one is at its VPC @@ -36,63 +61,120 @@ jobs: runs-on: ubuntu-latest outputs: targets: ${{ steps.select.outputs.targets }} - skip: ${{ steps.tested.outputs.skip }} + image-tag: ${{ steps.select.outputs.image-tag }} + registry: ${{ steps.select.outputs.registry }} steps: - - name: Skip if this commit already passed - id: tested - if: github.event_name == 'schedule' + - name: Select scenarios + id: select env: - GH_TOKEN: ${{ github.token }} + # Read once, here. Every later step takes the tag from this step's outputs. + # Only the scheduled run falls back to latest; manual and reusable calls must supply a tag. + REQUESTED_TAG: ${{ inputs['image-tag'] || github.event.inputs['image-tag'] || (github.event_name == 'schedule' && 'latest' || '') }} + REQUESTED_REGISTRY: ${{ inputs.registry || github.event.inputs.registry || 'docker' }} + REQUESTED_TARGET: ${{ inputs.target || github.event.inputs.target }} run: | - $passed = gh run list --repo $Env:GITHUB_REPOSITORY --workflow cloud-database-tests.yml --event schedule --status success --commit $Env:GITHUB_SHA --limit 1 --json url | ConvertFrom-Json + $tag = $Env:REQUESTED_TAG + if ([string]::IsNullOrWhiteSpace($tag)) { + throw "The image tag is required." + } + $tag = $tag.Trim() + if ($tag -notmatch '^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$') { + throw "'$tag' is not a valid container image tag." + } - if ($passed) { - Write-Output "$Env:GITHUB_SHA already passed in $($passed[0].url), skipping" - "skip=true" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append + # Map the registry name once. Later steps use the path. + $registryPaths = @{ docker = 'docker.io/particular'; ghcr = 'ghcr.io/particular' } + $registry = $Env:REQUESTED_REGISTRY.Trim() + if (-not $registryPaths.ContainsKey($registry)) { + throw "'$registry' is not a supported registry. Use docker or ghcr." } - - name: Select targets - id: select - run: | - $all = @( - @{ target = 'azure-sqlserver'; provider = 'SqlServer' } - @{ target = 'azure-postgresql'; provider = 'PostgreSql' } - @{ target = 'aurora-postgresql'; provider = 'PostgreSql' } - @{ target = 'rds-sqlserver'; provider = 'SqlServer' } + $registryPath = $registryPaths[$registry] + + # An omitted target runs all scenarios. + $requested = $Env:REQUESTED_TARGET + Write-Output "Event $Env:GITHUB_EVENT_NAME, image tag '$tag', registry '$registryPath', target '$requested'" + + # Container settings and connection-string variables use different provider names. + $databases = @{ + 'azure-sqlserver' = @{ provider = 'SqlServer'; persistence = 'SQLServer'; managed = $true } + 'azure-postgresql' = @{ provider = 'PostgreSql'; persistence = 'PostgreSQL'; managed = $true } + 'aurora-postgresql' = @{ provider = 'PostgreSql'; persistence = 'PostgreSQL'; managed = $true } + 'rds-sqlserver' = @{ provider = 'SqlServer'; persistence = 'SQLServer'; managed = $true } + 'local-postgresql' = @{ provider = 'PostgreSql'; persistence = 'PostgreSQL'; managed = $false } + 'local-ravendb' = @{ provider = 'RavenDB'; persistence = 'RavenDB'; managed = $false } + } + + # Keep each managed target covered; use local containers when a transport must repeat. + $smoke = @( + @{ transport = 'NetStandardAzureServiceBus'; storage = 'azure-sqlserver'; bodystorage = 'AzureBlob' } + @{ transport = 'RabbitMQ.QuorumConventionalRouting'; storage = 'azure-postgresql'; bodystorage = 'FileSystem' } + @{ transport = 'AmazonSQS'; storage = 'aurora-postgresql'; bodystorage = 'FileSystem' } + # Disabled: needs a bucket installer with cleanup, S3 settings, and S3 in the body-storage allowlist. + # @{ transport = 'SQLServer'; storage = 'local-postgresql'; bodystorage = 'S3' } + @{ transport = 'RabbitMQ.QuorumConventionalRouting'; storage = 'rds-sqlserver'; bodystorage = 'FileSystem' } + @{ transport = 'SQLServer'; storage = 'local-postgresql'; bodystorage = 'FileSystem' } + @{ transport = 'PostgreSQL'; storage = 'local-postgresql'; bodystorage = 'FileSystem' } + @{ transport = 'RabbitMQ.QuorumConventionalRouting'; storage = 'local-ravendb'; bodystorage = 'RavenDB' } ) - # A tag push or the nightly schedule has no input, and runs everything. - $requested = '${{ inputs.target }}' - $targets = if (-not $requested -or $requested -eq 'all') { $all } else { $all | Where-Object { $_.target -eq $requested } } + foreach ($scenario in $smoke) { + $database = $databases[$scenario.storage] + if (-not $database) { throw "Unknown storage '$($scenario.storage)'." } + $scenario.name = "$($scenario.transport)-$($scenario.storage)-$($scenario.bodystorage)" + $scenario.provider = $database.provider + $scenario.persistence = $database.persistence + $scenario.managed = $database.managed + $scenario.azure = ($database.managed -and $scenario.storage.StartsWith('azure-')) -or $scenario.transport -eq 'NetStandardAzureServiceBus' -or $scenario.bodystorage -eq 'AzureBlob' + $scenario.aws = ($database.managed -and $scenario.storage -match '^(aurora|rds)-') -or $scenario.transport -eq 'AmazonSQS' + $scenario.localSql = $scenario.transport -eq 'SQLServer' + $scenario.localPostgres = (-not $database.managed -and $database.persistence -eq 'PostgreSQL') -or $scenario.transport -eq 'PostgreSQL' + } + + $problems = @() + if (($smoke.name | Select-Object -Unique).Count -ne $smoke.Count) { $problems += 'scenario names are not unique' } + if (Compare-Object @($smoke | Where-Object { $_.managed } | ForEach-Object { $_.storage }) @($databases.Keys | Where-Object { $databases[$_].managed })) { $problems += 'each managed database must appear exactly once' } + foreach ($s in $smoke) { + if (-not ($s.transport -and $s.storage -and $s.bodystorage)) { $problems += "$($s.name): transport, storage and bodystorage are all required" } + if ($s.transport -notin 'NetStandardAzureServiceBus', 'RabbitMQ.QuorumConventionalRouting', 'AmazonSQS', 'SQLServer', 'PostgreSQL') { $problems += "$($s.name): unsupported transport" } + if ($s.bodystorage -notin 'FileSystem', 'AzureBlob', 'RavenDB') { $problems += "$($s.name): unsupported message body storage" } + if (($s.persistence -eq 'RavenDB') -ne ($s.bodystorage -eq 'RavenDB')) { $problems += "$($s.name): RavenDB keeps bodies itself, and no other storage can" } + } + foreach ($transport in 'NetStandardAzureServiceBus', 'RabbitMQ.QuorumConventionalRouting', 'AmazonSQS', 'SQLServer', 'PostgreSQL') { if ($transport -notin $smoke.transport) { $problems += "no scenario for transport $transport" } } + foreach ($persistence in 'SQLServer', 'PostgreSQL', 'RavenDB') { if ($persistence -notin $smoke.persistence) { $problems += "no scenario for storage $persistence" } } + foreach ($body in 'FileSystem', 'AzureBlob') { if ($body -notin $smoke.bodystorage) { $problems += "no scenario for message body storage $body" } } + if ($problems) { throw "Invalid scenario list: $($problems -join '; ')" } + + Write-Output '::warning title=Smoke scenario disabled::SQLServer-local-postgresql-S3 is commented out because no installer creates an S3 bucket. Message body storage S3 is not smoke tested.' + + if (@($smoke | Where-Object { $_.transport -eq 'AmazonSQS' -and (-not $requested -or $requested -eq 'all' -or $_.storage -eq $requested) })) { + Write-Output '::warning title=SNS topics not cleaned up::The Amazon SQS scenario leaves GHA- SNS topics behind. The shared cleanup workflow removes only SQS queues.' + } + + $targets = if (-not $requested -or $requested -eq 'all') { $smoke } else { $smoke | Where-Object { $_.storage -eq $requested } } if (-not $targets) { - throw "No cloud target named '$requested'." + throw "No smoke scenario for target '$requested'." } - $targets | ForEach-Object { Write-Output "Will test against $($_.target)" } + $targets | ForEach-Object { Write-Output "Will test $($_.name)" } $matrix = @{ include = @($targets) } "targets=$(ConvertTo-Json -InputObject $matrix -Compress -Depth 4)" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append + "image-tag=$tag" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append + "registry=$registryPath" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append test: - name: ${{ matrix.target }} + name: ${{ matrix.name }} needs: plan - if: needs.plan.outputs.skip != 'true' runs-on: ubuntu-latest - # The slowest complete job so far took 70 minutes (rds-sqlserver from a runner far from - # us-east-2), and provisioning alone can take 25. Without a cap, a hung test run keeps its - # database and its runner for six hours. + # Bound a hung smoke run so its database and runner are not retained for six hours. timeout-minutes: 90 strategy: fail-fast: false matrix: ${{ fromJSON(needs.plan.outputs.targets) }} - # The suites that exercise the primary and audit persisters. Named outright rather than - # selected by test category, because the category also carries the transport tests, which test - # the queue transport against its own connection string and have no business running here. env: - PERSISTENCE_PROJECT: src/ServiceControl.Persistence.Tests.${{ matrix.provider }}/ServiceControl.Persistence.Tests.${{ matrix.provider }}.csproj - ACCEPTANCE_PROJECT: src/ServiceControl.AcceptanceTests.${{ matrix.provider }}/ServiceControl.AcceptanceTests.${{ matrix.provider }}.csproj - AUDIT_PERSISTENCE_PROJECT: src/ServiceControl.Audit.Persistence.Tests.${{ matrix.provider }}/ServiceControl.Audit.Persistence.Tests.${{ matrix.provider }}.csproj - AUDIT_ACCEPTANCE_PROJECT: src/ServiceControl.Audit.AcceptanceTests.${{ matrix.provider }}/ServiceControl.Audit.AcceptanceTests.${{ matrix.provider }}.csproj + IMAGE_TAG: ${{ needs.plan.outputs.image-tag }} + IMAGE_REGISTRY: ${{ needs.plan.outputs.registry }} steps: - name: Check for secrets env: @@ -120,72 +202,255 @@ jobs: run: | ./tools/dotnet-install.sh --skip-non-versioned-files --install-dir /usr/share/dotnet --runtime dotnet --version ${{ env.RuntimeVersion }} ./tools/dotnet-install.sh --skip-non-versioned-files --install-dir /usr/share/dotnet --runtime aspnetcore --version ${{ env.RuntimeVersion }} - - name: Build - id: build - background: true - run: | - dotnet build $Env:PERSISTENCE_PROJECT --configuration Release - dotnet build $Env:ACCEPTANCE_PROJECT --configuration Release - dotnet build $Env:AUDIT_PERSISTENCE_PROJECT --configuration Release - dotnet build $Env:AUDIT_ACCEPTANCE_PROJECT --configuration Release + # Each cloud resource below is created after the login that its teardown needs, and the + # teardown of every post step runs in reverse order. - name: Azure login uses: azure/login@v3.1.0 - if: startsWith(matrix.target, 'azure-') + if: matrix.azure with: creds: ${{ secrets.AZURE_ACI_CREDENTIALS }} + # Keep managed-database clients and provisioner teardown in the database's region. - name: Setup AWS environment variables - if: startsWith(matrix.target, 'aurora-') || startsWith(matrix.target, 'rds-') + if: matrix.aws run: | echo "AWS_REGION=${{ env.AWS_DATABASE_REGION }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - # Unlike ci.yml, which holds its cloud resources back until the build is done, provisioning - # starts first: it is the long pole here at anywhere from 3 to 25 minutes, and the database is - # torn down by this action's post step whatever the job does afterwards. - # - # It has to come after the login steps above. Post steps run in reverse, so this one's teardown - # runs before azure/login's post step signs the CLI out from under it. + # Provision after login so teardown runs before azure/login's post step signs out. - name: Provision database + if: matrix.managed uses: ./.github/actions/cloud-database with: - target: ${{ matrix.target }} + target: ${{ matrix.storage }} # The server is what isolates one run from another, so this has to be unique per run. It # includes the attempt because run_id does not change when a run is retried, and the # previous attempt's server may still be there or still be deleting. name: sc-ct-${{ github.run_id }}-${{ github.run_attempt }} - - name: Wait for build - wait: build - - name: Run tests - uses: Particular/run-tests-action@v1.9.0 + - name: Log in to Docker Hub + if: startsWith(needs.plan.outputs.registry, 'docker.io/') + uses: docker/login-action@v4.8.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log in to GitHub container registry + if: startsWith(needs.plan.outputs.registry, 'ghcr.io/') + uses: docker/login-action@v4.8.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # The container installers require setup-wsl-action even on Linux. + - name: Setup WSL + if: matrix.localSql || matrix.localPostgres || startsWith(matrix.transport, 'RabbitMQ') + uses: Particular/setup-wsl-action@v1.3.0 + timeout-minutes: 5 + - name: Setup SQL Server + if: matrix.localSql + uses: Particular/install-sql-server-action@v3.0.0 + with: + connection-string-env-var: ServiceControl_Persistence_SqlServer_ConnectionString + catalog: ServiceControl + - name: Setup PostgreSQL + if: matrix.localPostgres + uses: Particular/setup-postgres-action@v3.0.0 + with: + connection-string-name: ServiceControl_Persistence_PostgreSql_ConnectionString + registry-username: ${{ secrets.DOCKERHUB_USERNAME }} + registry-password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Setup RabbitMQ + if: startsWith(matrix.transport, 'RabbitMQ') + uses: Particular/setup-rabbitmq-action@v2.0.0 + with: + connection-string-name: ServiceControl_TransportTests_RabbitMQ_ConnectionString + registry-username: ${{ secrets.DOCKERHUB_USERNAME }} + registry-password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Setup Azure Service Bus + if: matrix.transport == 'NetStandardAzureServiceBus' + uses: Particular/setup-azureservicebus-action@v3.1.0 + with: + connection-string-name: ServiceControl_TransportTests_ASBS_ConnectionString + azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }} + tag: ServiceControl + env: + REGION_OVERRIDE: eastus + - name: Setup Azure Storage for message bodies + if: matrix.bodystorage == 'AzureBlob' + uses: Particular/setup-azurestorage-action@v2.0.0 with: - projects: ${{ env.PERSISTENCE_PROJECT }};${{ env.ACCEPTANCE_PROJECT }};${{ env.AUDIT_PERSISTENCE_PROJECT }};${{ env.AUDIT_ACCEPTANCE_PROJECT }} - max-parallel: 2 + connection-string-name: ServiceControl_MessageBody_Azure_ConnectionString + azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }} + tag: ServiceControl + env: + REGION_OVERRIDE: eastus + - name: Start RavenDB + if: matrix.persistence == 'RavenDB' + run: | + $gateway = docker network inspect bridge --format '{{(index .IPAM.Config 0).Gateway}}' + if ($LASTEXITCODE -ne 0 -or -not $gateway) { throw 'Could not find the gateway of the Docker bridge network.' } + + # The public URL is what RavenDB reports in its topology, so clients must be able to reach it. + # Keep the image's default server URL, the container's private address: an unsecured server whose + # URL is outside UnsecuredAccessAllowed, such as 0.0.0.0, answers every request with 503. + docker run --detach --name sc-smoke-ravendb --publish 8080:8080 --env "RAVEN_PublicServerUrl=http://${gateway}:8080" --env RAVEN_Security_UnsecuredAccessAllowed=PrivateNetwork "$Env:IMAGE_REGISTRY/servicecontrol-ravendb:$Env:IMAGE_TAG" + if ($LASTEXITCODE -ne 0) { throw 'Could not start the RavenDB container.' } + + $ready = $false + $lastError = 'no request completed' + $deadline = (Get-Date).AddMinutes(2) + while (-not $ready -and (Get-Date) -lt $deadline) { + try { + Invoke-WebRequest "http://${gateway}:8080/build/version" -TimeoutSec 5 | Out-Null + $ready = $true + } catch { + $lastError = $_.Exception.Message + Start-Sleep -Seconds 2 + } + } + if (-not $ready) { + docker logs sc-smoke-ravendb + throw "RavenDB did not answer within two minutes. Last error: $lastError" + } + - name: Run container smoke tests env: - ServiceControl_TESTS_FILTER: ${{ matrix.provider }} - ServiceControl_TESTS_SKIP_SCHEMA_CLEANUP: 'true' PARTICULARSOFTWARE_LICENSE: ${{ secrets.LICENSETEXT }} + TRANSPORT: ${{ matrix.transport }} + PERSISTENCE: ${{ matrix.persistence }} + PROVIDER: ${{ matrix.provider }} + BODYSTORAGE: ${{ matrix.bodystorage }} + LOCAL_SQL: ${{ matrix.localSql }} + LOCAL_POSTGRES: ${{ matrix.localPostgres }} + # The SQS region, not the database region the job environment keeps for provisioning. + AWS_REGION: ${{ secrets.AWS_REGION }} + # Match CI's queue cleanup prefix: https://github.com/Particular/NServiceBus.AmazonSQS/blob/master/.github/workflows/tests-cleanup.yml + SQS_PREFIX: GHA-${{ github.run_id }} + run: | + $gateway = docker network inspect bridge --format '{{(index .IPAM.Config 0).Gateway}}' + if ($LASTEXITCODE -ne 0 -or -not $gateway) { throw 'Could not find the gateway of the Docker bridge network.' } + + # The installers export a localhost address, which is not the runner's from inside a container. + if ($Env:LOCAL_SQL -eq 'true') { + $builder = [System.Data.Common.DbConnectionStringBuilder]::new() + $builder.set_ConnectionString($Env:ServiceControl_Persistence_SqlServer_ConnectionString) + if ($builder['Server'] -notin 'localhost', '127.0.0.1') { throw 'The SQL Server connection string does not address the local host.' } + $builder['Server'] = [string]$gateway + Write-Output "::add-mask::$($builder.get_ConnectionString())" + $Env:ServiceControl_Persistence_SqlServer_ConnectionString = $builder.get_ConnectionString() + } + if ($Env:LOCAL_POSTGRES -eq 'true') { + $builder = [System.Data.Common.DbConnectionStringBuilder]::new() + $builder.set_ConnectionString($Env:ServiceControl_Persistence_PostgreSql_ConnectionString) + if ($builder['Host'] -notin 'localhost', '127.0.0.1') { throw 'The PostgreSQL connection string does not address the local host.' } + $builder['Host'] = [string]$gateway + Write-Output "::add-mask::$($builder.get_ConnectionString())" + $Env:ServiceControl_Persistence_PostgreSql_ConnectionString = $builder.get_ConnectionString() + } + + $config = @{ + PARTICULARSOFTWARE_LICENSE = $Env:PARTICULARSOFTWARE_LICENSE + TRANSPORTTYPE = $Env:TRANSPORT + STORAGETYPE = $Env:PERSISTENCE + } + + switch -Wildcard ($Env:TRANSPORT) { + 'RabbitMQ*' { + # The tool accepts only the URI form, and the setup action exports host=127.0.0.1. + $config['CONNECTIONSTRING'] = "amqp://guest:guest@${gateway}:5672" + } + 'NetStandardAzureServiceBus' { $config['CONNECTIONSTRING'] = $Env:ServiceControl_TransportTests_ASBS_ConnectionString } + 'SQLServer' { $config['CONNECTIONSTRING'] = $Env:ServiceControl_Persistence_SqlServer_ConnectionString } + 'PostgreSQL' { + $config['CONNECTIONSTRING'] = $Env:ServiceControl_Persistence_PostgreSql_ConnectionString + # Transport tables are addressed by quoted name, so a dotted queue name is one table. + $Env:TestingTool__ServiceControlInputQueue = '"Particular.ServiceControl"' + $Env:TestingTool__MonitoringQueueName = '"Particular.Monitoring"' + } + 'AmazonSQS' { + if ([string]::IsNullOrWhiteSpace($Env:AWS_REGION)) { throw 'The AWS_REGION secret is required for the Amazon SQS scenario.' } + # Credentials never go in the connection string. The tool reads them from this process + # and the containers from the settings file. + $config['CONNECTIONSTRING'] = "Region=$Env:AWS_REGION;QueueNamePrefix=$Env:SQS_PREFIX;TopicNamePrefix=$Env:SQS_PREFIX" + $config['AWS_REGION'] = $Env:AWS_REGION + $config['AWS_ACCESS_KEY_ID'] = $Env:AWS_ACCESS_KEY_ID + $config['AWS_SECRET_ACCESS_KEY'] = $Env:AWS_SECRET_ACCESS_KEY + } + default { throw "Unsupported transport '$Env:TRANSPORT'." } + } + + if ($Env:PERSISTENCE -eq 'RavenDB') { + $config['RAVENDB_CONNECTIONSTRING'] = "http://${gateway}:8080" + } else { + $config['DATABASE_CONNECTIONSTRING'] = (Get-Item "Env:ServiceControl_Persistence_$($Env:PROVIDER)_ConnectionString").Value + } + + switch ($Env:BODYSTORAGE) { + 'FileSystem' { + # The primary and audit instances each need their own body location. + $bodies = Join-Path $Env:RUNNER_TEMP 'bodies' + New-Item -ItemType Directory -Force "$bodies/primary", "$bodies/audit" | Out-Null + chmod -R 777 $bodies + if ($LASTEXITCODE -ne 0) { throw "Could not make $bodies writable for the containers." } + + $config['MESSAGEBODY_STORAGETYPE'] = 'FileSystem' + $Env:SC_CONTAINER_TESTS_MOUNTS = "${bodies}:/bodies" + $Env:SC_CONTAINER_TESTS_PRIMARY_MESSAGEBODY_FILESYSTEM_STORAGEPATH = '/bodies/primary' + $Env:SC_CONTAINER_TESTS_AUDIT_MESSAGEBODY_FILESYSTEM_STORAGEPATH = '/bodies/audit' + } + 'AzureBlob' { + $config['MESSAGEBODY_STORAGETYPE'] = 'AzureBlob' + $config['MESSAGEBODY_AZURE_CONNECTIONSTRING'] = $Env:ServiceControl_MessageBody_Azure_ConnectionString + $Env:SC_CONTAINER_TESTS_PRIMARY_MESSAGEBODY_AZURE_CONTAINERNAME = 'error-bodies' + $Env:SC_CONTAINER_TESTS_AUDIT_MESSAGEBODY_AZURE_CONTAINERNAME = 'audit-bodies' + } + 'RavenDB' { } # RavenDB keeps bodies itself, so the containers get no message body settings. + default { throw "Unsupported message body storage '$Env:BODYSTORAGE'." } + } + + $configPath = Join-Path $Env:RUNNER_TEMP 'containers.json' + $config | ConvertTo-Json | Set-Content $configPath + $Env:SC_CONTAINER_TESTS_CONFIG = $configPath + $Env:SC_CONTAINER_TESTS_TAG = $Env:IMAGE_TAG + $Env:SC_CONTAINER_TESTS_REGISTRY = $Env:IMAGE_REGISTRY + + dotnet test tools/testing-tool/TestingTool.ContainerSmokeTests --configuration Release --logger GitHubActions + - name: Remove RavenDB + if: always() && matrix.persistence == 'RavenDB' + run: | + $container = docker ps --all --quiet --filter 'name=^/sc-smoke-ravendb$' + if ($LASTEXITCODE -ne 0) { throw 'Could not look for the RavenDB container.' } + if (-not $container) { + Write-Output 'The RavenDB container was never created.' + exit 0 + } + + docker logs sc-smoke-ravendb + if ($LASTEXITCODE -ne 0) { Write-Output '::warning::Could not read the RavenDB container logs.' } + + docker rm --force sc-smoke-ravendb + if ($LASTEXITCODE -ne 0) { throw 'Could not remove the RavenDB container.' } notify: name: Notify Slack needs: [plan, test] - # Only the nightly run reports, because whoever starts a run by hand or through a release is - # already watching it. - if: ${{ !cancelled() && github.event_name == 'schedule' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} + if: ${{ !cancelled() && github.event_name == 'schedule' && contains(needs.*.result, 'failure') }} runs-on: ubuntu-latest steps: - name: Notify Slack on failure + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + REF_NAME: ${{ github.ref_name }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | $headers = @{ - 'Authorization' = "Bearer ${{ secrets.SLACK_TOKEN }}" + Authorization = "Bearer $Env:SLACK_TOKEN" } $body = @{ channel = 'pulse-and-control' - text = "Nightly cloud database tests failed on ${{ github.ref_name }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + text = "Nightly cloud database tests failed on $($Env:REF_NAME): $Env:RUN_URL" username = 'Cloud database tests' icon_emoji = 'github_actions' - unfurl_links = false - unfurl_media = false + unfurl_links = $false + unfurl_media = $false } | ConvertTo-Json - $result = Invoke-RestMethod -Method POST -Uri https://slack.com/api/chat.postMessage -ContentType "application/json; charset=utf-8" -Headers $headers -Body $body + $result = Invoke-RestMethod -Method POST -Uri https://slack.com/api/chat.postMessage -ContentType 'application/json; charset=utf-8' -Headers $headers -Body $body Write-Output $result exit $(If ($result.ok) { 0 } Else { 1 }) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9f2fea97d..390ed8d736 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,5 +17,9 @@ jobs: uses: ./.github/workflows/build-db-container.yml secrets: inherit cloud-tests: + needs: [containers, db-container] uses: ./.github/workflows/cloud-database-tests.yml + with: + image-tag: ${{ github.ref_name }} + registry: ghcr secrets: inherit \ No newline at end of file diff --git a/docs/cloud-database-tests.md b/docs/cloud-database-tests.md index 66701cd5b6..359e312b5f 100644 --- a/docs/cloud-database-tests.md +++ b/docs/cloud-database-tests.md @@ -1,6 +1,6 @@ # Cloud database tests -The `Cloud database tests` workflow (`.github/workflows/cloud-database-tests.yml`) runs the SQL Server and PostgreSQL persistence and acceptance suites against managed databases. Every target runs nightly on the default branch, and also whenever the release workflow calls it. To run it yourself, start it from the Actions tab and choose one target, or `all`. Starting a run cancels any run of the workflow already in progress on the same branch. The nightly run skips a commit that has already passed a nightly run, and posts to the `pulse-and-control` Slack channel when a target fails or is cancelled. For each target, the `.github/actions/cloud-database` action creates a server for the run, exports the connection strings below, and deletes the server when the job ends. +The `Cloud database tests` workflow (`.github/workflows/cloud-database-tests.yml`) runs the [container smoke tests](../tools/testing-tool/TestingTool.ContainerSmokeTests/README.md) against managed and local databases. It runs every night at 03:17 UTC on the default branch using the `latest` image tag from Docker Hub. Manual and reusable calls require an `image-tag` input. The plan rejects a missing, empty, or whitespace-only tag for those calls, then trims it and checks that it is a valid container image tag. The optional `registry` input selects `docker` (Docker Hub, `docker.io/particular`, the default) or `ghcr` (`ghcr.io/particular`), and the plan rejects any other value. Starting a run cancels any run of the workflow already in progress on the same branch. Scheduled failures notify the `pulse-and-control` Slack channel; manual and release runs do not. For each managed target, the `.github/actions/cloud-database` action creates a server for the run, exports the connection strings below, and deletes the server when the job ends. | Variable | Targets | Signs in with | | --- | --- | --- | @@ -9,28 +9,34 @@ The `Cloud database tests` workflow (`.github/workflows/cloud-database-tests.yml | `ServiceControl_Persistence_SqlServer_TokenConnectionString` | `azure-sqlserver` | A Microsoft Entra ID token | | `ServiceControl_Persistence_PostgreSql_TokenConnectionString` | `azure-postgresql`, `aurora-postgresql` | A Microsoft Entra ID token on Azure, an IAM token on Aurora | -## Schema cleanup +The smoke scenarios use only the password connection strings. The token connection strings are for the [token authentication fixtures](testing-persistence.md#token-authentication-fixtures) in the persistence test projects, which this workflow does not run. -The cloud workflow sets `ServiceControl_TESTS_SKIP_SCHEMA_CLEANUP=true` on its test step. SQL Server and PostgreSQL test helpers leave each test's schema in place, avoiding schema-drop timeouts. Tests still use unique schemas and retain host shutdown, connection disposal, and temporary-file cleanup. The provisioning action deletes the server in its post step, including on test failure or cancellation. +## Container smoke tests -When schema cleanup is disabled, SQL Server cleanup disables each completed test's full-text indexes after its host stops. This stops unfinished populations and automatic updates without dropping tables or schemas, so retained indexes do not keep indexing for later tests. Cleanup uses a separate connection because host disposal can dispose the test's data source. PostgreSQL cleanup remains a no-op. +The release workflow waits for the application images and the RavenDB database image, then passes the release tag as `image-tag` with `registry: ghcr`, because release images exist only in GHCR at that point. A manual run can supply any image tag published to the selected registry, for example `7.0.3`, and can select one database target or `all`. Every run selects the scenarios below, or the scenarios for the selected target. -Disabling an index still executes DDL and can encounter lock contention. This does not remove contention from concurrent schema creation or migrations, or guarantee that a live test's full-text population completes. See [ALTER FULLTEXT INDEX](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-fulltext-index-transact-sql#arguments) for the effects of `DISABLE`. +Each smoke scenario has separate `transport`, `storage`, and `bodystorage` values, and its name joins those values with hyphens. The explicit list covers the testing tool's supported transports, persistence providers, and available body stores without testing every combination. Managed resources use same-cloud combinations where possible; repeated transports use local containers. Azure SQL and RDS SQL Server are the SQL Server storage targets. SQL Server storage requires full-text search, which the local SQL Server container does not provide. The SQL Server container serves only as a transport and needs no full-text search. The storage of that scenario is the PostgreSQL container. The tool does not support Azure Storage Queues, IBM MQ, or MSMQ, so those CI transport categories are outside this smoke-test list. -Schema cleanup remains enabled when the variable is unset or has any value other than `true` (case-insensitive). Set it only for disposable databases whose owner deletes the database after the run. Retained tables and indexes consume storage until deletion. +| Transport | Storage | Body storage | +| --- | --- | --- | +| Azure Service Bus | Azure SQL Server | Azure Blob | +| RabbitMQ | Azure PostgreSQL | File system | +| Amazon SQS | Aurora PostgreSQL | File system | +| RabbitMQ | RDS SQL Server | File system | +| SQL Server container | PostgreSQL container | File system | +| PostgreSQL container | PostgreSQL container | File system | +| RabbitMQ | RavenDB container | RavenDB attachments | -## Token authentication fixtures +Conditional installer steps provision each dependency. The SQL Server, PostgreSQL, RabbitMQ, Azure Service Bus, and Azure storage-account installers are also used by CI. The single `Run container smoke tests` step then builds the settings file and per-instance body settings from the scenario's transport, storage, and body storage, and ends with `dotnet test --logger GitHubActions`, which reports results as annotations and in the job summary. Local services expose a Docker bridge address that both the runner and the ServiceControl containers can reach. The plan maps the registry once, and the workflow logs in to the selected registry with the Docker Hub credentials or the `GITHUB_TOKEN`. It passes the registry path to the tests as `SC_CONTAINER_TESTS_REGISTRY`. The RavenDB container uses `servicecontrol-ravendb` from the same registry path, with the same tag as the application images. It keeps the image's default server URL, the container's private address, and allows unsecured access from private networks. An unsecured RavenDB server whose URL falls outside the allowed range, such as `0.0.0.0`, answers every request with 503. -The suites use the password connection strings. Only the token authentication fixtures use the token connection strings, and each fixture is ignored when its variable is not set. A token fixture applies the migrations to a new schema, writes a row and reads it back, all through the token login. It drops the schema through that login unless schema cleanup is disabled. +File system bodies use separate primary and audit directories. Azure Blob bodies use separate containers in the account created by the Azure storage installer. RavenDB stores bodies internally and receives no external body-storage settings. -* `azure-sqlserver` makes the service principal that `azure/login` signed in as the server's Microsoft Entra admin and keeps SQL authentication enabled. The connection string has `Authentication=Active Directory Default` and no `User ID` or `Password`. SqlClient gets the token from `DefaultAzureCredential`, which finds the Azure CLI sign-in on the runner. -* `azure-postgresql` enables Microsoft Entra authentication alongside password authentication and makes the same service principal a Microsoft Entra admin of the server. The admin's role name is the principal's client ID. The connection string uses that client ID as its `Username` and sets `Token Authentication=AzureEntraId`. -* `aurora-postgresql` enables IAM database authentication on the cluster and creates an `sc_iam` user that has `rds_iam` and `CREATE` on the test database. The master user must not get `rds_iam`: a user with that role can no longer sign in with a password, and the suites sign in as the master user. The connection string sets `Token Authentication=AwsRdsIam`. +The S3 scenario, a SQL Server transport with PostgreSQL container storage, is commented out because the repository has no S3 bucket installer with cleanup. It does not provide active S3 coverage. Enabling it requires bucket provisioning and cleanup, S3 settings for each instance, and inclusion in the plan's body-storage allowlist. -## AWS permissions +The Amazon SQS scenario uses the `AWS_REGION` secret and the `GHA-` queue prefix from `ci.yml`. It applies the same prefix to SNS topics for run isolation. The smoke-test step overrides its process's region; database provisioning and post-step teardown retain `AWS_DATABASE_REGION`. -The AWS identity that the workflow uses needs `rds-db:connect` for `sc_iam`. The file `.github/actions/cloud-database/aws-iam-policy.json` lists every permission that identity needs, this one included. The workflow does not apply the file, so add a new permission to the identity by hand before the first run that depends on it. +The workflow delegates queue deletion to the [Amazon SQS cleanup workflow](https://github.com/Particular/NServiceBus.AmazonSQS/blob/master/.github/workflows/tests-cleanup.yml). That job must target the same AWS account and region; this repository does not verify its secrets. It does not delete SNS topics. The plan warns that the scenario leaves its prefixed topics behind. -## Running a token fixture locally +## AWS permissions -Set the fixture's variable to a connection string for a server that accepts your own token login. For example, use a server where you are the Microsoft Entra admin and have signed in with `az login`. +The file `.github/actions/cloud-database/aws-iam-policy.json` documents AWS database permissions, including `rds-db:connect` for the optional `sc_iam` token fixtures. The workflow does not apply this policy. Configure the database permissions and the [SQS transport permissions](https://docs.particular.net/transports/sqs/) on the AWS identity before running the corresponding scenario. diff --git a/docs/testing-persistence.md b/docs/testing-persistence.md index 7d59bece46..c68f8a9d36 100644 --- a/docs/testing-persistence.md +++ b/docs/testing-persistence.md @@ -10,7 +10,7 @@ All persistence test projects can be run with `dotnet test` against the correspo ## Test isolation on the SQL persisters -The SQL Server and PostgreSQL suites give each test its own **schema** in one shared database, named `sc_test_` for persistence tests and `sc_at_` for acceptance tests, and drop it on teardown. This uses the same `Database/Schema` setting that is offered to customers, so every run exercises that feature. +The SQL Server and PostgreSQL suites give each test its own **schema** in one shared database, named `sc_test_` for persistence tests and `sc_at_` for acceptance tests, and drop it on teardown by default. This uses the same `Database/Schema` setting that is offered to customers, so every run exercises that feature. Two consequences follow: @@ -45,3 +45,25 @@ ServiceControl_Persistence_PostgreSql_ConnectionString ``` to a valid PostgreSQL connection string. It must name a database that exists, because the tests create their schemas in whatever database it points at. The test container creates a `servicecontroltests` database for this, so that test schemas do not end up in the `postgres` maintenance database. + +## Schema cleanup + +Setting `ServiceControl_TESTS_SKIP_SCHEMA_CLEANUP=true` makes the SQL Server and PostgreSQL test helpers leave each test's schema in place, avoiding schema-drop timeouts. Tests still use unique schemas and retain host shutdown, connection disposal, and temporary-file cleanup. + +When schema cleanup is disabled, SQL Server cleanup disables each completed test's full-text indexes after its host stops. This stops unfinished populations and automatic updates without dropping tables or schemas, so retained indexes do not keep indexing for later tests. Cleanup uses a separate connection because host disposal can dispose the test's data source. PostgreSQL cleanup remains a no-op. + +Disabling an index still executes DDL and can encounter lock contention. This does not remove contention from concurrent schema creation or migrations, or guarantee that a live test's full-text population completes. See [ALTER FULLTEXT INDEX](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-fulltext-index-transact-sql#arguments) for the effects of `DISABLE`. + +Schema cleanup remains enabled when the variable is unset or has any value other than `true` (case-insensitive). Set it only for disposable databases whose owner deletes the database after the run. Retained tables and indexes consume storage until deletion. + +## Token authentication fixtures + +The persistence suites use the password connection strings. Only the token authentication fixtures use the token connection strings, and each fixture is ignored when its variable is not set. The [cloud database tests](cloud-database-tests.md) provisioner exports the token connection strings for its managed targets, but its container smoke scenarios do not run these fixtures. A token fixture applies the migrations to a new schema, writes a row and reads it back, all through the token login. It drops the schema through that login unless schema cleanup is disabled. + +* `azure-sqlserver` makes the service principal that `azure/login` signed in as the server's Microsoft Entra admin and keeps SQL authentication enabled. The connection string has `Authentication=Active Directory Default` and no `User ID` or `Password`. SqlClient gets the token from `DefaultAzureCredential`, which finds the Azure CLI sign-in on the runner. +* `azure-postgresql` enables Microsoft Entra authentication alongside password authentication and makes the same service principal a Microsoft Entra admin of the server. The admin's role name is the principal's client ID. The connection string uses that client ID as its `Username` and sets `Token Authentication=AzureEntraId`. +* `aurora-postgresql` enables IAM database authentication on the cluster and creates an `sc_iam` user that has `rds_iam` and `CREATE` on the test database. The master user must not get `rds_iam`: a user with that role can no longer sign in with a password, and the suites sign in as the master user. The connection string sets `Token Authentication=AwsRdsIam`. + +## Running a token fixture locally + +Set the fixture's variable to a connection string for a server that accepts your own token login. For example, use a server where you are the Microsoft Entra admin and have signed in with `az login`. diff --git a/docs/testing.md b/docs/testing.md index ce3c2b7a52..b08053af37 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -24,7 +24,7 @@ On Windows, [PackagedRavenDBTests](../src/ServiceControlInstaller.Engine.UnitTes ## Persistence tests -Persistence tests check assumptions at the persistence seam level by exercising each persister. For local setup details, see [Local testing of persistence providers](testing-persistence.md). For the workflow that runs these suites against managed cloud databases, see [Cloud database tests](cloud-database-tests.md). +Persistence tests check assumptions at the persistence seam level by exercising each persister. For local setup details, see [Local testing of persistence providers](testing-persistence.md). For the workflow that smoke tests container images against managed and local databases, see [Cloud database tests](cloud-database-tests.md). The RavenDB persistence test projects contain an `IndexDefinitionTests` test that approves the definition of every index the persister deploys. The test first deploys the indexes to a new database with the Lucene settings that `DatabaseSetup` uses, so the approved text is the definition a new installation deploys. The indexes inherit Lucene from that database, so a `Configuration` line in the approved file comes from the index definition itself. RavenDB rebuilds an index side by side when its definition changes, and the rebuild of a large database can take days. When the test fails, record the changed indexes in the upgrade guide of the next release before you approve the new definition. An operator who locked an index must unlock it to receive the change. See [Database schema and index changes](guidelines/database-schema-and-index-changes.md) for when such a change can ship. @@ -117,7 +117,7 @@ Containers built by a PR and stored on GitHub Container Registry can be tested l ## Container tests with the testing tool -The [container tests](../tools/testing-tool/TestingTool.ContainerSmokeTests/README.md) start the ServiceControl, audit and monitoring containers from an image tag and run the testing tool's smoke checks against them, using a transport, database and cloud resources that you provide. They run only when `SC_CONTAINER_TESTS_TAG` is set, so a normal test run never starts a container. The README covers the prerequisites, the settings and examples with PostgreSQL and with Amazon SQS and S3. +The [container tests](../tools/testing-tool/TestingTool.ContainerSmokeTests/README.md) start the ServiceControl, audit and monitoring containers from an image tag and run the testing tool's smoke checks against them, using a transport, database and cloud resources that you provide. They run only when `SC_CONTAINER_TESTS_TAG` is set, so a normal test run never starts a container. The README covers the prerequisites, the settings and examples with PostgreSQL and with Amazon SQS and S3. The [cloud database workflow](cloud-database-tests.md#container-smoke-tests) provisions dependencies for an explicit list of transport, storage, and body-storage scenarios. It uses Docker Hub images by default, can use GHCR, and requires an image tag except on its scheduled `latest` run. ## Smoke tests with the testing tool diff --git a/src/ServiceControl.Audit.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs b/src/ServiceControl.Audit.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs index e49a78dff2..43f5e91b15 100644 --- a/src/ServiceControl.Audit.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs +++ b/src/ServiceControl.Audit.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs @@ -18,7 +18,7 @@ public async Task Migrates_round_trips_locks_and_drops_the_schema_with_a_real_to if (string.IsNullOrEmpty(connectionString)) { - Assert.Ignore($"{TokenConnectionStrings.CloudVariable} is not set. The cloud database tests set it for the azure-postgresql and aurora-postgresql targets, see docs/cloud-database-tests.md."); + Assert.Ignore($"{TokenConnectionStrings.CloudVariable} is not set. See docs/testing-persistence.md#token-authentication-fixtures."); } var schema = $"sc_token_{Guid.NewGuid():n}"; diff --git a/src/ServiceControl.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs b/src/ServiceControl.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs index d46376df3e..97946ec742 100644 --- a/src/ServiceControl.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs +++ b/src/ServiceControl.Persistence.Tests.PostgreSql/TokenAuthenticationCloudTests.cs @@ -17,7 +17,7 @@ public async Task Migrates_round_trips_and_drops_the_schema_with_a_real_token() if (string.IsNullOrEmpty(connectionString)) { - Assert.Ignore($"{TokenConnectionStrings.CloudVariable} is not set. The cloud database tests set it for the azure-postgresql and aurora-postgresql targets, see docs/cloud-database-tests.md."); + Assert.Ignore($"{TokenConnectionStrings.CloudVariable} is not set. See docs/testing-persistence.md#token-authentication-fixtures."); } var settings = TokenAuthenticationTests.CreateSettings(connectionString, $"sc_token_{Guid.NewGuid():n}"); diff --git a/src/ServiceControl.Persistence.Tests.SqlServer/EntraIdAuthenticationTests.cs b/src/ServiceControl.Persistence.Tests.SqlServer/EntraIdAuthenticationTests.cs index f5b5732eff..e766ec5b85 100644 --- a/src/ServiceControl.Persistence.Tests.SqlServer/EntraIdAuthenticationTests.cs +++ b/src/ServiceControl.Persistence.Tests.SqlServer/EntraIdAuthenticationTests.cs @@ -23,7 +23,7 @@ public static void RequireTokenConnectionString() if (string.IsNullOrEmpty(connectionString)) { - Assert.Ignore($"{ConnectionStringVariable} is not set. The cloud database tests set it for the azure-sqlserver target, see docs/cloud-database-tests.md."); + Assert.Ignore($"{ConnectionStringVariable} is not set. See docs/testing-persistence.md#token-authentication-fixtures."); } } diff --git a/tools/testing-tool/TestingTool.ContainerSmokeTests/README.md b/tools/testing-tool/TestingTool.ContainerSmokeTests/README.md index 67de88fdef..d7c016745e 100644 --- a/tools/testing-tool/TestingTool.ContainerSmokeTests/README.md +++ b/tools/testing-tool/TestingTool.ContainerSmokeTests/README.md @@ -4,6 +4,8 @@ Starts the packaged ServiceControl primary, audit and monitoring containers from The suite starts only the three ServiceControl containers. The services they depend on must exist already: the message broker or database that hosts the transport, the persistence database, and any cloud account and bucket. ServiceControl and the tests' endpoints create the queues, topics and tables themselves when they start. The settings that point the containers at these services are passed through untouched. +The [cloud database workflow](../../../docs/cloud-database-tests.md#container-smoke-tests) provisions these dependencies for its explicit scenario list. It selects transport, storage, and body storage independently, prepares settings in one script, and runs this project once per scenario, using the workflow's selected image tag and registry. The RavenDB scenario starts the published database container with the same image tag and registry. S3 coverage is disabled there until a bucket installer with cleanup is available; the manual S3 example below requires an existing bucket. + ## Prerequisites - A Docker daemon that the current user can reach, and access to the registry that holds the images (`docker login ghcr.io` for the default registry). @@ -30,7 +32,7 @@ Container logs are printed when the run ends, and when the containers fail to st | Variable | Meaning | | --- | --- | | `SC_CONTAINER_TESTS_TAG` | Image tag for all three images. Required to run the container tests | -| `SC_CONTAINER_TESTS_REGISTRY` | Registry path of the images, default `ghcr.io/particular`. Use it for locally built images | +| `SC_CONTAINER_TESTS_REGISTRY` | Registry path of the images, default `ghcr.io/particular`. Use it for locally built images. The [cloud database workflow](../../../docs/cloud-database-tests.md) sets it from its `registry` input, which defaults to Docker Hub | | `SC_CONTAINER_TESTS_CONFIG` | A `.env` (`KEY=VALUE`, optional `export`, optional quotes, `#` comments) or `.json` (`{"KEY":"VALUE"}`) file of environment variables for all containers | | `SC_CONTAINER_TESTS_PRIMARY_*`, `SC_CONTAINER_TESTS_AUDIT_*`, `SC_CONTAINER_TESTS_MONITORING_*` | Environment variables for one container. The prefix is removed. They override the common settings | | `SC_CONTAINER_TESTS_MOUNTS` | Bind mounts for all containers, `host:container[:ro\|rw]`, separated by `;` or new lines. Windows drive letters are not supported | diff --git a/tools/testing-tool/TestingTool.ContainerSmokeTests/TestingTool.ContainerSmokeTests.csproj b/tools/testing-tool/TestingTool.ContainerSmokeTests/TestingTool.ContainerSmokeTests.csproj index 1e17ae889c..6ccc2fb1b0 100644 --- a/tools/testing-tool/TestingTool.ContainerSmokeTests/TestingTool.ContainerSmokeTests.csproj +++ b/tools/testing-tool/TestingTool.ContainerSmokeTests/TestingTool.ContainerSmokeTests.csproj @@ -11,6 +11,7 @@ +