Skip to content

Commit

Permalink
update sanity test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Jun 22, 2024
1 parent b6f50a9 commit 6766043
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 20 deletions.
18 changes: 10 additions & 8 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,7 @@ function revert-to-checkpoint {
docker exec ${NODE_NAME} sr_cli /tools system configuration checkpoint initial revert
}

# copy sanity ignore files from ignore-2.10.txt to all other supported ansible versions
function copy-sanity-ignore {
_cdTests
cd sanity
for version in 2.14; do
cp ignore-2.10.txt ignore-${version}.txt
done
}


# -----------------------------------------------------------------------------
# Test functions.
Expand Down Expand Up @@ -335,6 +328,15 @@ function ci-test {
ANSIBLE_CONFIG=ci-ansible.cfg _run-tests "$@"
}

# copy sanity ignore files from ignore-2.10.txt to all other supported ansible versions
function copy-sanity-ignore {
_cdTests
cd sanity
for version in 2.14 2.15 2.16 2.17; do
cp ignore-2.10.txt ignore-${version}.txt
done
}

# sanity-test runs ansible-test tool with sanity checks.
function sanity-test {
install-local-collection
Expand Down
11 changes: 5 additions & 6 deletions tests/sanity/ignore-2.10.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
plugins/httpapi/srlinux.py validate-modules:missing-gplv3-license
plugins/httpapi/srlinux.py validate-modules:import-before-documentation
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.6+
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.10+
plugins/modules/cli.py import-3.5!skip
plugins/modules/cli.py import-3.6!skip
plugins/modules/cli.py import-3.7!skip
plugins/modules/cli.py import-3.8!skip
plugins/modules/cli.py import-3.9!skip
plugins/modules/cli.py validate-modules:missing-gplv3-license
plugins/modules/cli.py validate-modules:import-before-documentation
plugins/modules/get.py import-2.7!skip
plugins/modules/get.py import-3.5!skip
plugins/modules/get.py validate-modules:missing-gplv3-license
plugins/modules/get.py validate-modules:import-before-documentation
plugins/modules/config.py import-2.7!skip
plugins/modules/config.py import-3.5!skip
plugins/modules/config.py validate-modules:missing-gplv3-license
plugins/modules/config.py validate-modules:import-before-documentation
plugins/modules/validate.py import-2.7!skip
plugins/modules/validate.py import-3.5!skip
plugins/modules/validate.py validate-modules:missing-gplv3-license
plugins/modules/validate.py validate-modules:import-before-documentation
plugins/module_utils/srlinux.py import-2.7!skip
plugins/module_utils/srlinux.py import-3.5!skip
plugins/module_utils/const.py import-2.7!skip
Expand Down
11 changes: 5 additions & 6 deletions tests/sanity/ignore-2.14.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
plugins/httpapi/srlinux.py validate-modules:missing-gplv3-license
plugins/httpapi/srlinux.py validate-modules:import-before-documentation
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.6+
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.10+
plugins/modules/cli.py import-3.5!skip
plugins/modules/cli.py import-3.6!skip
plugins/modules/cli.py import-3.7!skip
plugins/modules/cli.py import-3.8!skip
plugins/modules/cli.py import-3.9!skip
plugins/modules/cli.py validate-modules:missing-gplv3-license
plugins/modules/cli.py validate-modules:import-before-documentation
plugins/modules/get.py import-2.7!skip
plugins/modules/get.py import-3.5!skip
plugins/modules/get.py validate-modules:missing-gplv3-license
plugins/modules/get.py validate-modules:import-before-documentation
plugins/modules/config.py import-2.7!skip
plugins/modules/config.py import-3.5!skip
plugins/modules/config.py validate-modules:missing-gplv3-license
plugins/modules/config.py validate-modules:import-before-documentation
plugins/modules/validate.py import-2.7!skip
plugins/modules/validate.py import-3.5!skip
plugins/modules/validate.py validate-modules:missing-gplv3-license
plugins/modules/validate.py validate-modules:import-before-documentation
plugins/module_utils/srlinux.py import-2.7!skip
plugins/module_utils/srlinux.py import-3.5!skip
plugins/module_utils/const.py import-2.7!skip
Expand Down
28 changes: 28 additions & 0 deletions tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins/httpapi/srlinux.py validate-modules:missing-gplv3-license
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.10+
plugins/modules/cli.py import-3.5!skip
plugins/modules/cli.py import-3.6!skip
plugins/modules/cli.py import-3.7!skip
plugins/modules/cli.py import-3.8!skip
plugins/modules/cli.py import-3.9!skip
plugins/modules/cli.py validate-modules:missing-gplv3-license
plugins/modules/get.py import-2.7!skip
plugins/modules/get.py import-3.5!skip
plugins/modules/get.py validate-modules:missing-gplv3-license
plugins/modules/config.py import-2.7!skip
plugins/modules/config.py import-3.5!skip
plugins/modules/config.py validate-modules:missing-gplv3-license
plugins/modules/validate.py import-2.7!skip
plugins/modules/validate.py import-3.5!skip
plugins/modules/validate.py validate-modules:missing-gplv3-license
plugins/module_utils/srlinux.py import-2.7!skip
plugins/module_utils/srlinux.py import-3.5!skip
plugins/module_utils/const.py import-2.7!skip
plugins/module_utils/const.py import-3.5!skip
plugins/module_utils/const.py compile-2.7!skip
plugins/module_utils/const.py compile-3.5!skip
plugins/module_utils/srlinux.py compile-2.7!skip
plugins/module_utils/srlinux.py compile-3.5!skip
plugins/module_utils/const.py future-import-boilerplate!skip
plugins/module_utils/const.py metaclass-boilerplate!skip
tests/playbooks/golden/clab-ansible-srl.cfg.yml yamllint!skip
28 changes: 28 additions & 0 deletions tests/sanity/ignore-2.16.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins/httpapi/srlinux.py validate-modules:missing-gplv3-license
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.10+
plugins/modules/cli.py import-3.5!skip
plugins/modules/cli.py import-3.6!skip
plugins/modules/cli.py import-3.7!skip
plugins/modules/cli.py import-3.8!skip
plugins/modules/cli.py import-3.9!skip
plugins/modules/cli.py validate-modules:missing-gplv3-license
plugins/modules/get.py import-2.7!skip
plugins/modules/get.py import-3.5!skip
plugins/modules/get.py validate-modules:missing-gplv3-license
plugins/modules/config.py import-2.7!skip
plugins/modules/config.py import-3.5!skip
plugins/modules/config.py validate-modules:missing-gplv3-license
plugins/modules/validate.py import-2.7!skip
plugins/modules/validate.py import-3.5!skip
plugins/modules/validate.py validate-modules:missing-gplv3-license
plugins/module_utils/srlinux.py import-2.7!skip
plugins/module_utils/srlinux.py import-3.5!skip
plugins/module_utils/const.py import-2.7!skip
plugins/module_utils/const.py import-3.5!skip
plugins/module_utils/const.py compile-2.7!skip
plugins/module_utils/const.py compile-3.5!skip
plugins/module_utils/srlinux.py compile-2.7!skip
plugins/module_utils/srlinux.py compile-3.5!skip
plugins/module_utils/const.py future-import-boilerplate!skip
plugins/module_utils/const.py metaclass-boilerplate!skip
tests/playbooks/golden/clab-ansible-srl.cfg.yml yamllint!skip
28 changes: 28 additions & 0 deletions tests/sanity/ignore-2.17.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins/httpapi/srlinux.py validate-modules:missing-gplv3-license
plugins/modules/cli.py import-2.7!skip # srlinux collection requires py3.10+
plugins/modules/cli.py import-3.5!skip
plugins/modules/cli.py import-3.6!skip
plugins/modules/cli.py import-3.7!skip
plugins/modules/cli.py import-3.8!skip
plugins/modules/cli.py import-3.9!skip
plugins/modules/cli.py validate-modules:missing-gplv3-license
plugins/modules/get.py import-2.7!skip
plugins/modules/get.py import-3.5!skip
plugins/modules/get.py validate-modules:missing-gplv3-license
plugins/modules/config.py import-2.7!skip
plugins/modules/config.py import-3.5!skip
plugins/modules/config.py validate-modules:missing-gplv3-license
plugins/modules/validate.py import-2.7!skip
plugins/modules/validate.py import-3.5!skip
plugins/modules/validate.py validate-modules:missing-gplv3-license
plugins/module_utils/srlinux.py import-2.7!skip
plugins/module_utils/srlinux.py import-3.5!skip
plugins/module_utils/const.py import-2.7!skip
plugins/module_utils/const.py import-3.5!skip
plugins/module_utils/const.py compile-2.7!skip
plugins/module_utils/const.py compile-3.5!skip
plugins/module_utils/srlinux.py compile-2.7!skip
plugins/module_utils/srlinux.py compile-3.5!skip
plugins/module_utils/const.py future-import-boilerplate!skip
plugins/module_utils/const.py metaclass-boilerplate!skip
tests/playbooks/golden/clab-ansible-srl.cfg.yml yamllint!skip

0 comments on commit 6766043

Please sign in to comment.