We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b39b666 commit cf0e1d9Copy full SHA for cf0e1d9
test/namespace_admin_test.py
@@ -2,7 +2,7 @@
2
3
import os
4
from pathlib import Path
5
-from typing import Optional
+from typing import Callable, Optional
6
7
import pexpect
8
from test_base import TestBase
@@ -30,6 +30,12 @@ def run_test(self):
30
finally:
31
self.cleanup()
32
33
+ def this_is_the_current_context(self, context: str) -> Callable[[], bool]:
34
+ cmd = "kubectl config current-context"
35
+ current_context = run_command(cmd).strip()
36
+ self.log.info(f"Current context: {current_context} {context == current_context}")
37
+ return lambda: current_context == context
38
+
39
def setup_namespaces(self):
40
self.log.info("Setting up the namespaces")
41
self.log.info(self.warnet(f"deploy {self.namespace_dir}"))
0 commit comments