mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Install pre-commit and use GitHub Actions (#94)
* added pre-commit and code-cleaning * removed tox and TravisCI
This commit is contained in:
@@ -29,4 +29,4 @@ scenarios:
|
||||
|
||||
actions:
|
||||
- checkPodCount:
|
||||
count: 3
|
||||
count: 3
|
||||
|
||||
@@ -22,4 +22,4 @@ spec:
|
||||
value: '60'
|
||||
# ENTER THE COMMA SEPARATED TARGET NODES NAME
|
||||
- name: TARGET_NODES
|
||||
value: ''
|
||||
value: ''
|
||||
|
||||
@@ -32,4 +32,4 @@ scenarios:
|
||||
|
||||
actions:
|
||||
- checkPodCount:
|
||||
count: 3
|
||||
count: 3
|
||||
|
||||
@@ -30,4 +30,4 @@ scenarios:
|
||||
timeout: 180
|
||||
actions:
|
||||
- checkPodCount:
|
||||
count: 3
|
||||
count: 3
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -19,4 +19,3 @@ scenarios:
|
||||
actions:
|
||||
- checkPodCount:
|
||||
count: 2
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -32,4 +32,4 @@ scenarios:
|
||||
|
||||
actions:
|
||||
- checkPodCount:
|
||||
count: 2
|
||||
count: 2
|
||||
|
||||
Reference in New Issue
Block a user