Skip to content

Migrates Test_DeployEnvironmentTemplate to use new types - #12497

Merged
lakshmimsft merged 2 commits into
mainfrom
feat/migrate-cli-delete-tests
Jul 30, 2026
Merged

Migrates Test_DeployEnvironmentTemplate to use new types#12497
lakshmimsft merged 2 commits into
mainfrom
feat/migrate-cli-delete-tests

Conversation

@lakshmimsft

Copy link
Copy Markdown
Contributor

Summary

This pull request migrates the  Test_DeployEnvironmentTemplate  functional test ( test/functional-portable/cli/noncloud ) from the legacy  Applications.Core/environments  type to the new  Radius.Core/environments@2025-08-01-preview  type. .

Reason for change

Part of effort to migrate tests to new types.

File change summary

File Summary of change
test/functional-portable/cli/noncloud/env_deploy_test.go Migrated Test_DeployEnvironmentTemplate to Radius.Core/environments; derive the K8s namespace from the same unique suffix as the resource group and pass it to the template as envNamespace; pre-create/clean up the namespace.
test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicep Migrated template to Radius.Core/recipePacks + Radius.Core/environments@2025-08-01-preview; added an envNamespace parameter used for providers.kubernetes.namespace.
test/functional-portable/cli/noncloud/namespace_helpers_test.go New test helpers: newCLIWithoutDefaultEnvironment, createKubernetesNamespace, and deleteKubernetesNamespace.

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@lakshmimsft
lakshmimsft marked this pull request as ready for review July 21, 2026 00:30
@lakshmimsft
lakshmimsft requested review from a team as code owners July 21, 2026 00:30
Copilot AI review requested due to automatic review settings July 21, 2026 00:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the Test_DeployEnvironmentTemplate functional test from the legacy Applications.Core/environments resource type to the newer Radius.Core/environments@2025-08-01-preview model, including provisioning a per-test Kubernetes namespace and deploying an environment + recipe pack via Bicep.

Changes:

  • Updated the deploy test to use Radius.Core/environments, pass an envNamespace parameter, and create/clean up a unique Kubernetes namespace per run.
  • Updated the Bicep template to create a Radius.Core/recipePacks resource and reference it from the new Radius.Core/environments resource, using providers.kubernetes.namespace.
  • Added test helpers for creating a CLI config without a default environment and for Kubernetes namespace lifecycle.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/functional-portable/cli/noncloud/env_deploy_test.go Updates the functional test to deploy/show Radius.Core/environments and to pass a unique envNamespace parameter with namespace pre-create/cleanup.
test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicep Migrates the template to Radius.Core/recipePacks + Radius.Core/environments@2025-08-01-preview, with providers.kubernetes.namespace driven by envNamespace.
test/functional-portable/cli/noncloud/namespace_helpers_test.go Adds helper functions for a “no default environment” CLI config and Kubernetes namespace create/delete.

Comment thread test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicep Outdated
Comment thread test/functional-portable/cli/noncloud/namespace_helpers_test.go Outdated
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    456 suites  ±0   6m 31s ⏱️ -50s
6 106 tests ±0  6 104 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 338 runs  ±0  7 336 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 231fdd4. ± Comparison against base commit ea90bf4.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.02%. Comparing base (ea90bf4) to head (231fdd4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12497      +/-   ##
==========================================
- Coverage   54.03%   54.02%   -0.01%     
==========================================
  Files         765      765              
  Lines       50747    50747              
==========================================
- Hits        27419    27416       -3     
- Misses      20750    20752       +2     
- Partials     2578     2579       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lakshmimsft
lakshmimsft requested a review from nithyatsu July 23, 2026 06:19
@nithyatsu

Copy link
Copy Markdown
Contributor

lgtm once copilot comments are addressed.

Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Copilot AI review requested due to automatic review settings July 29, 2026 17:03
@lakshmimsft
lakshmimsft force-pushed the feat/migrate-cli-delete-tests branch from 8cd622a to 91ddac0 Compare July 29, 2026 17:03
@lakshmimsft
lakshmimsft enabled auto-merge July 29, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicep:12

  • The PR description says this template was migrated to Radius.Core/recipePacks + Radius.Core/environments@2025-08-01-preview, but the updated Bicep file only defines the Radius.Core/environments resource (no recipePacks resource/module). Please either update the PR description to match what changed, or add the missing recipe pack migration if it’s required for the scenario.
resource env 'Radius.Core/environments@2025-08-01-preview' = {
  name: 'test-deploy-env'
  properties: {
    providers: {
      kubernetes: {
        namespace: envNamespace
      }

Comment thread test/rp/rptest.go
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Copilot AI review requested due to automatic review settings July 29, 2026 17:12
@lakshmimsft
lakshmimsft force-pushed the feat/migrate-cli-delete-tests branch from 91ddac0 to 231fdd4 Compare July 29, 2026 17:12
@radius-functional-tests

radius-functional-tests Bot commented Jul 29, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref 231fdd4
Unique ID func090df78a59
Image tag pr-func090df78a59
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func090df78a59
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func090df78a59
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func090df78a59
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func090df78a59
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func090df78a59
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ ucp-cloud functional tests succeeded
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ corerp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicep:6

  • PR description says this template was migrated to include Radius.Core/recipePacks, but the updated file only defines a Radius.Core/environments@2025-08-01-preview resource. Either add the intended recipe pack resource here or update the PR description/file-change summary to match what was actually changed.
@description('Specifies the Kubernetes namespace where the environment deploys recipe resources.')
param envNamespace string = 'default-test-deploy-env'

resource env 'Radius.Core/environments@2025-08-01-preview' = {

@lakshmimsft
lakshmimsft added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 973b6b7 Jul 30, 2026
79 checks passed
@lakshmimsft
lakshmimsft deleted the feat/migrate-cli-delete-tests branch July 30, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants