Skip to content

Commit 12b0c4d

Browse files
committed
Round 23 fix: skip test on transient kubectl error
test_revoke_non_resource_url_rule_is_removed's post-revoke clusterrole fetch fell through to json.loads('') when kubectl returned neither NotFound nor valid JSON (network blip, auth error). Raise skipTest in that case, matching the _auth_can_i pattern the other new integration tests use.
1 parent 3d6c508 commit 12b0c4d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/test_provider_kubeconfig.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ def test_revoke_non_resource_url_rule_is_removed(self):
11081108
role_out_after, role_err_after = _run_command("kubectl get clusterrole " + sa + " -o json" + self.kubeconfig_flag)
11091109
if role_err_after and "NotFound" in role_err_after:
11101110
pass
1111+
elif not role_out_after:
1112+
self.skipTest(f"transient kubectl error reading clusterrole: {role_err_after.strip()}")
11111113
else:
11121114
role_obj_after = json.loads(role_out_after)
11131115
self.assertFalse(

0 commit comments

Comments
 (0)