Migrates Test_DeployEnvironmentTemplate to use new types - #12497
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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 anenvNamespaceparameter, and create/clean up a unique Kubernetes namespace per run. - Updated the Bicep template to create a
Radius.Core/recipePacksresource and reference it from the newRadius.Core/environmentsresource, usingproviders.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. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
lgtm once copilot comments are addressed. |
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
8cd622a to
91ddac0
Compare
There was a problem hiding this comment.
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 theRadius.Core/environmentsresource (norecipePacksresource/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
}
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
91ddac0 to
231fdd4
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
There was a problem hiding this comment.
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 aRadius.Core/environments@2025-08-01-previewresource. 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' = {
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
test/functional-portable/cli/noncloud/env_deploy_test.goTest_DeployEnvironmentTemplatetoRadius.Core/environments; derive the K8s namespace from the same unique suffix as the resource group and pass it to the template asenvNamespace; pre-create/clean up the namespace.test/functional-portable/cli/noncloud/testdata/corerp-env-deploy-test.bicepRadius.Core/recipePacks+Radius.Core/environments@2025-08-01-preview; added anenvNamespaceparameter used forproviders.kubernetes.namespace.test/functional-portable/cli/noncloud/namespace_helpers_test.gonewCLIWithoutDefaultEnvironment,createKubernetesNamespace, anddeleteKubernetesNamespace.