Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions testing/test_baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def validator_results():
with open(os.path.join(dir, '../', 'runtime/validation/faux-dev/result.json')) as f:
return json.load(f)

@pytest.mark.skip(reason="requires internet")
def test_internet_connectivity(container_data):
assert container_data['network']['internet'] == 200

Expand All @@ -43,6 +44,7 @@ def test_dns_server_resolves(container_data):
assert re.match(r'[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}',
container_data['dns_response'])

@pytest.mark.skip(reason="requires internet")
def test_validator_results_compliant(validator_results):
results = [True if x['result'] == 'compliant' else False
for x in validator_results['results']]
Expand Down
7 changes: 4 additions & 3 deletions testing/test_pylint
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

ERROR_LIMIT=2534
ERROR_LIMIT=1100

sudo cmd/install

Expand All @@ -12,9 +12,10 @@ files=$(find . -path ./venv -prune -o -name '*.py' -print)
OUT=pylint.out

rm -f $OUT && touch $OUT
pylint $files -ry --extension-pkg-allow-list=docker 2>/dev/null | tee -a $OUT

new_errors=$(cat $OUT | grep "statements analysed." | awk '{print $1}')
pylint $files -ry --extension-pkg-allow-list=docker --evaluation="error + warning + refactor + convention" 2>/dev/null | tee -a $OUT

new_errors=$(cat $OUT | grep -oP "(?!=^Your code has been rated at)([0-9]+)(?=\.00/10[ \(]?)" )

echo "$new_errors > $ERROR_LIMIT?"
if (( $new_errors > $ERROR_LIMIT)); then
Expand Down