{CI} Replace deprecated assertRaisesRegexp and assertEquals - #8010
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi Hang (@bebound), |
|
CI |
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
Qi Pan (Pan-Qi)
left a comment
There was a problem hiding this comment.
Missed some ending line of file, other than that LGTM
| assert os.path.exists(self.kwargs['filename']) | ||
| finally: | ||
| os.remove(self.kwargs['filename']) No newline at end of file | ||
| os.remove(self.kwargs['filename']) |
There was a problem hiding this comment.
Missing ending line
| JMESPathCheck('facebookAppId', 'facebook_id')]).get_output_in_json() | ||
|
|
||
| self.assertIn('https://audience1', result['allowedAudiences']) No newline at end of file | ||
| self.assertIn('https://audience1', result['allowedAudiences']) |
There was a problem hiding this comment.
Missing ending line
|
|
||
| # delete policy 2 | ||
| self.cmd('network firewall policy delete -g {rg} --name {policy_name_2}') No newline at end of file | ||
| self.cmd('network firewall policy delete -g {rg} --name {policy_name_2}') |
There was a problem hiding this comment.
Missing ending line
|
|
||
| # delete the kube config | ||
| os.remove("%s" % (_get_test_data_file(managed_cluster_name + '-config.yaml'))) No newline at end of file | ||
| os.remove("%s" % (_get_test_data_file(managed_cluster_name + '-config.yaml'))) |
There was a problem hiding this comment.
Missing ending line
| self.assertEqual(len(dplistinrg), 0, msg="Data product list is not empty after deletion") | ||
|
|
||
| pass No newline at end of file | ||
| pass |
There was a problem hiding this comment.
Missing ending line
There was a problem hiding this comment.
I don't understand. The old file is missing ending line, not the new file.
| with self.assertRaisesRegex(CLIError, "Disabling 'cluster-connect' feature is not allowed when \ | ||
| 'custom-locations' feature is enabled."): | ||
| self.cmd('connectedk8s disable-features -n {name} -g {rg} --features cluster-connect --kube-config \ | ||
| {kubeconfig} --kube-context {managed_cluster_name}-admin -y') |
There was a problem hiding this comment.
Why a new assert is added?
There was a problem hiding this comment.
This might be introduced when Git merge conflict. Fixed.
assertRaisesRegexp and assertEquals in testassertRaisesRegexp and assertEquals
assertRaisesRegexpis removed in 3.12: Azure/azure-cli#29504assertEqualsis removed in 3.12: Azure/azure-cli#29515Apply same changes in extension.
This PR only changes the test file, it should not affect user.