Add e2e test for x-radius-sensitive annotation updates#11348
Add e2e test for x-radius-sensitive annotation updates#11348lakshmimsft wants to merge 6 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11348 +/- ##
==========================================
- Coverage 51.10% 51.09% -0.01%
==========================================
Files 699 699
Lines 44067 44067
==========================================
- Hits 22521 22518 -3
- Misses 19400 19402 +2
- Partials 2146 2147 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e552078 to
b5d53dd
Compare
b5d53dd to
5ba468a
Compare
b919236 to
320f953
Compare
320f953 to
8adbd82
Compare
test/functional-portable/dynamicrp/noncloud/resources/testdata/testresourcetypes.yaml
Show resolved
Hide resolved
8adbd82 to
ae1a4fa
Compare
test/functional-portable/dynamicrp/noncloud/resources/testdata/sensitive-resource-update.bicep
Outdated
Show resolved
Hide resolved
120aad6 to
140679d
Compare
140679d to
4dd6e40
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new DynamicRP functional (non-cloud portable) test scenario to validate handling of x-radius-sensitive fields for user-defined resource types, including recipe-time decryption and GET/LIST-time redaction.
Changes:
- Add a new DynamicRP resource type schema (
sensitiveResource) with a mix of sensitive/non-sensitive fields (including nested + object-level sensitivity). - Add Bicep templates for deploying the sensitive resource and a recipe that writes decrypted values into a Kubernetes Secret.
- Add an end-to-end functional test that verifies redaction on GET/LIST and verifies decrypted values were provided to the recipe on create and update.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/testrecipes/test-bicep-recipes/dynamicrp_sensitive_recipe.bicep | New recipe writes decrypted sensitive values into a K8s Secret for verification. |
| test/functional-portable/dynamicrp/noncloud/resources/testdata/testresourcetypes.yaml | Adds sensitiveResource schema with x-radius-sensitive annotations. |
| test/functional-portable/dynamicrp/noncloud/resources/testdata/sensitive-resource.bicep | Deploys env/app and the sensitiveResource instance wired to the new recipe. |
| test/functional-portable/dynamicrp/noncloud/resources/sensitive_fields_test.go | New functional test validating GET/LIST redaction and recipe-time decryption on create/update. |
test/functional-portable/dynamicrp/noncloud/resources/sensitive_fields_test.go
Outdated
Show resolved
Hide resolved
test/functional-portable/dynamicrp/noncloud/resources/sensitive_fields_test.go
Outdated
Show resolved
Hide resolved
test/functional-portable/dynamicrp/noncloud/resources/sensitive_fields_test.go
Outdated
Show resolved
Hide resolved
test/functional-portable/dynamicrp/noncloud/resources/sensitive_fields_test.go
Outdated
Show resolved
Hide resolved
4dd6e40 to
9799cc1
Compare
| SkipKubernetesOutputResourceValidation: true, | ||
| SkipObjectValidation: true, | ||
| SkipResourceDeletion: true, | ||
| PostStepVerify: func(ctx context.Context, t *testing.T, ct rp.RPTest) { |
There was a problem hiding this comment.
Is it possible to move this to a helper function between the put and update steps?
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
7371e66 to
585f7fb
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
This pull request adds new functional tests that validates sensitive field encryption and redaction for user-defined resource types in the dynamic resource provider. The test ensures that fields marked with the
x-radius-sensitiveannotation are encrypted on creation and update, and are redacted (set to null) when retrieved via GET or LIST operations. The changes include the test logic, supporting Bicep templates, and the resource type schema definition.Type of change
Fixes: #11097
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: