Install pre-commit and use GitHub Actions (#94)

* added pre-commit and code-cleaning

* removed tox and TravisCI
This commit is contained in:
Amit Sagtani
2021-05-05 19:23:45 +05:30
committed by GitHub
parent 70b14956c7
commit d00d6ec69e
43 changed files with 424 additions and 438 deletions

View File

@@ -29,4 +29,4 @@ scenarios:
actions:
- checkPodCount:
count: 3
count: 3

View File

@@ -22,4 +22,4 @@ spec:
value: '60'
# ENTER THE COMMA SEPARATED TARGET NODES NAME
- name: TARGET_NODES
value: ''
value: ''

View File

@@ -32,4 +32,4 @@ scenarios:
actions:
- checkPodCount:
count: 3
count: 3

View File

@@ -30,4 +30,4 @@ scenarios:
timeout: 180
actions:
- checkPodCount:
count: 3
count: 3

View File

@@ -5,9 +5,9 @@ import logging
def run(cmd):
try:
output = subprocess.Popen(cmd, shell=True,
universal_newlines=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output = subprocess.Popen(
cmd, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
(out, err) = output.communicate()
logging.info("out " + str(out))
except Exception as e:

View File

@@ -19,4 +19,3 @@ scenarios:
actions:
- checkPodCount:
count: 2

View File

@@ -15,8 +15,11 @@ def list_namespaces():
cli = client.CoreV1Api()
ret = cli.list_namespace(pretty=True)
except ApiException as e:
logging.error("Exception when calling \
CoreV1Api->list_namespaced_pod: %s\n" % e)
logging.error(
"Exception when calling \
CoreV1Api->list_namespaced_pod: %s\n"
% e
)
for namespace in ret.items:
namespaces.append(namespace.metadata.name)
return namespaces
@@ -47,9 +50,9 @@ def check_namespaces(namespaces):
def run(cmd):
try:
output = subprocess.Popen(cmd, shell=True,
universal_newlines=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output = subprocess.Popen(
cmd, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
(out, err) = output.communicate()
except Exception as e:
logging.error("Failed to run %s, error: %s" % (cmd, e))

View File

@@ -32,4 +32,4 @@ scenarios:
actions:
- checkPodCount:
count: 2
count: 2