From 823e9f62aa43350574b8862005772345a2fc5737 Mon Sep 17 00:00:00 2001 From: Andrei Stepanov Date: Sep 25 2019 15:12:01 +0000 Subject: Merge #371 `fix yamllint reported errors under tests/` --- diff --git a/tests/basic.yml b/tests/basic.yml index 0589b29..12adf16 100644 --- a/tests/basic.yml +++ b/tests/basic.yml @@ -13,7 +13,8 @@ - test-basic-parameters: dir: ./ run: echo "check parameters on basic role" | grep "check parameters on basic role" - # make sure having testcase named 'test' doesn't delete test.log. see: https://pagure.io/standard-test-roles/issue/339 + # make sure having testcase named 'test' doesn't delete test.log. + # see: https://pagure.io/standard-test-roles/issue/339 - test: dir: ./ run: ls @@ -35,8 +36,9 @@ tests: - basic with advanced cmdline: dir: ./ - run: | - echo -n "Cmdline test: "; a="some text"; [ "x$a" = "xsome text" ] && (echo "Passed"; exit 0) || (echo "Failed"; exit 1) + run: > + echo -n "Cmdline test: "; a="some text"; + [ "x$a" = "xsome text" ] && (echo "Passed"; exit 0) || (echo "Failed"; exit 1) tasks: - import_tasks: shared-tasks/artifacts_test_env.yml - import_tasks: shared-tasks/artifacts_test_runner.yml diff --git a/tests/python-syntax.sh b/tests/python-syntax.sh index dd6694d..f6db497 100755 --- a/tests/python-syntax.sh +++ b/tests/python-syntax.sh @@ -50,7 +50,7 @@ fi virtualenv ${virt_env_dir} source ${virt_env_dir}/bin/activate -pip3 install inspektor +pip3 install -r tests/requirements.txt if [[ $? -ne 0 ]]; then deactivate echo "FAIL: Could not install inspektor" diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..5b82cda --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,19 @@ +astroid==2.2.5 +cliff==2.16.0 +cmd2==0.8.9 +inspektor==0.5.2 +isort==4.3.21 +lazy-object-proxy==1.4.2 +mccabe==0.6.1 +pbr==5.4.3 +prettytable==0.7.2 +pycodestyle==2.5.0 +pylint==2.3.1 +pyparsing==2.4.2 +pyperclip==1.7.0 +PyYAML==5.1.2 +six==1.12.0 +stevedore==1.31.0 +typed-ast==1.4.0 +wcwidth==0.1.7 +wrapt==1.11.2 diff --git a/tests/shared-tasks/artifacts_test_env.yml b/tests/shared-tasks/artifacts_test_env.yml index 4d8ae88..0b04db5 100644 --- a/tests/shared-tasks/artifacts_test_env.yml +++ b/tests/shared-tasks/artifacts_test_env.yml @@ -6,4 +6,3 @@ file: state: absent path: "{{remote_artifacts}}/" - diff --git a/tests/shared-tasks/verify_error_test.yml b/tests/shared-tasks/verify_error_test.yml index 5d1253d..530be80 100644 --- a/tests/shared-tasks/verify_error_test.yml +++ b/tests/shared-tasks/verify_error_test.yml @@ -8,4 +8,3 @@ when: test_log.stdout.find("ERROR") == -1 # We should fail when we can not find ERROR string on log # -1 means string not found - diff --git a/tests/shared-tasks/verify_failed_test.yml b/tests/shared-tasks/verify_failed_test.yml index a51af94..ce74459 100644 --- a/tests/shared-tasks/verify_failed_test.yml +++ b/tests/shared-tasks/verify_failed_test.yml @@ -8,4 +8,3 @@ when: test_log.stdout.find("FAIL") == -1 # We should fail when we can not find FAIL string on log # -1 means string not found - diff --git a/tests/source.yml b/tests/source.yml index c23901a..f6bb90a 100644 --- a/tests/source.yml +++ b/tests/source.yml @@ -10,5 +10,6 @@ srcdir: "{{playbook_dir}}/source" tasks: - name: "Check if sources were pulled for zsh" - shell: ls "{{playbook_dir}}/source/configure" "{{playbook_dir}}/source/aczsh.m4" "{{playbook_dir}}/source/patch-created.txt" - + shell: > + ls "{{playbook_dir}}/source/configure" "{{playbook_dir}}/source/aczsh.m4" + "{{playbook_dir}}/source/patch-created.txt"