Unit tests improvements
- From now on, black must pass. Jenkins will give a -1 if it doesn't
- Ignore E203 because it is not pep8 compliant, and conflicts with black
https://github.com/psf/black/issues/315#issuecomment-395457972
- Black fixes and minor fix in unit test
- Fix devops-stages/stage-test.sh: jenkins was not giving a -1 when tox
was failing
Change-Id: Ic7318dcb6d4006a271607cd064a1f36d0936b7b9
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/n2vc/kubectl.py b/n2vc/kubectl.py
index ff48eda..a56b6cd 100644
--- a/n2vc/kubectl.py
+++ b/n2vc/kubectl.py
@@ -254,10 +254,15 @@
delay=1,
fallback=Exception("Failed getting the secret from service account"),
)
- async def get_secret_data(self, name: str, namespace: str = "kube-system") -> (str, str):
+ async def get_secret_data(
+ self, name: str, namespace: str = "kube-system"
+ ) -> (str, str):
"""
Get secret data
+ :param: name: Name of the secret data
+ :param: namespace: Name of the namespace where the secret is stored
+
:return: Tuple with the token and client certificate
"""
v1_core = self.clients[CORE_CLIENT]