Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logs and some test changes to help debug test failure in Test_CLI_Del…
…ete (radius-project#6881) # Description Changes to debug test failure issue: radius-project#6872 Used a different app name and namespace for the failing test instead of reusing from a previous one in the file Added more logs ## Type of change <!-- Please select **one** of the following options that describes your change and delete the others. Clearly identifying the type of change you are making will help us review your PR faster, and is used in authoring release notes. If you are making a bug fix or functionality change to Radius and do not have an associated issue link please create one now. --> - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). <!-- Please update the following to link the associated issue. This is required for some kinds of changes (see above). --> Fixes: #issue_number ## Auto-generated summary <!-- GitHub Copilot for docs will auto-generate a summary of the PR --> <!-- copilot:all --> ### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset) Generated by Copilot at fb725ff</samp> ### Summary 🗑️🐳🧪 <!-- 1. 🗑️ - This emoji represents the deletion of an application and its associated resources, as well as the improved output message for this action. 2. 🐳 - This emoji represents the addition of a new bicep template file that defines an application with two containers, which are a common resource type for Kubernetes applications. 3. 🧪 - This emoji represents the extension of the test function to cover the new scenario of deleting an application with unassociated resources, as well as the added logging to the validation functions. --> This pull request adds a test case and a test data file for deleting an application with unassociated resources using the CLI. It also improves the output message for deleting an application and adds logging to the validation functions. > _Sing, O Muse, of the valiant code reviewers who scrutinized the pull request_ > _And of the skillful coder who improved the CLI with his diligent quest_ > _To make the output message clearer when an application is deleted by name_ > _And to test the deletion of unassociated resources, those containers of fame_ ### Walkthrough * Change the output message for deleting an application to include the application name ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-87907dd86f66c5e0992fef2ea8d8bc09cf79e4cf4e6d9108cb137a536da03c10L166-R166)) * Add a new bicep template file `corerp-kubernetes-cli-with-unassociated-resources.bicep` that defines an application with two unassociated resources ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9cf9c8faf8c86483d2b71a394c55ab338f6a1fa2d9cc536f8af502718436cd36R1-R40)) - Declare new variables for the application name and the template file path of the application with unassociated resources ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dR529), [link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dR538-R540)) - Deploy the application with unassociated resources and validate that the pods are running ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dL579-R590)) - Delete one of the unassociated resources using the management client ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dL592-R602)) - Delete the application without deleting the remaining resources using the `DeleteAppWithoutDeletingResources` helper function ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dL592-R602)) - Redeploy the application using an empty template file ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dL592-R602)) - Delete the other unassociated resource using the management client ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-9f50fd192c3de42201f2c910d3f4ba78ec369dd7c50ea61ba500fa7518f4e81dL605-R610)) * Modify the validation functions `ValidateObjectsRunning` and `matchesActualLabels` to log the number and labels of the deployed resources for debugging purposes ([link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-a52153bfeb452a3dd497767a98db0dc1a0621e012f6e6d8dd9d4b5ec758b4dc2L343-R345), [link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-a52153bfeb452a3dd497767a98db0dc1a0621e012f6e6d8dd9d4b5ec758b4dc2L535-R535), [link](https://github.com/radius-project/radius/pull/6881/files?diff=unified&w=0#diff-a52153bfeb452a3dd497767a98db0dc1a0621e012f6e6d8dd9d4b5ec758b4dc2R555-R556)) Signed-off-by: vinayada1 <[email protected]> Co-authored-by: Nithya Subramanian <[email protected]>
- Loading branch information