Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects

Run some tests just if plugin is installed.

Merged Diego MENDEZ requested to merge feature/test_tags into develop
All threads resolved!
1 file
+ 4
6
Compare changes
  • Side-by-side
  • Inline
+ 4
6
@@ -43,11 +43,10 @@ run-test-job:
- source "$CI_PROJECT_DIR/plugins/venv/bin/activate"
- pip install -r "$CI_PROJECT_DIR/tests/requirements.e2e.txt"
# Remove some tests if plugins are not installed, to keep compatibility with Netbox_v4 branches.
- if [[ $(cat requirements.txt | grep -e mac -e cert | wc -l) != 0 ]];
- if [[ $(cat requirements.txt | grep -e mac -e cert -e rps | wc -l) == 0 ]];
then
rm -r $CI_PROJECT_DIR/tests/e2e/netbox/{netbox_cert_plugin,netbox_mac_address_plugin};
echo "Removed mac's and cert's tests.";
ls "$CI_PROJECT_DIR/tests/e2e/netbox/";
rm -r $CI_PROJECT_DIR/tests/e2e/netbox/{netbox_cert_plugin,netbox_mac_address_plugin,netbox_rps_plugin};
echo "Removed mac's, cert's && rps' tests.";
fi
script:
- env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-dist-plugin.xml "$CI_PROJECT_DIR/tests/e2e/"
@@ -68,11 +67,10 @@ run-robot-test-job:
- source "$CI_PROJECT_DIR/plugins/venv/bin/activate"
- docker build -t robotframework:latest ./tests/docker/
# Remove some tests if plugins are not installed, to keep compatibility with Netbox_v4 branches.
- if [[ $(cat requirements.txt | grep -e mac -e cert | wc -l) != 0 ]];
- if [[ $(cat requirements.txt | grep -e mac -e cert | wc -l) == 0 ]];
then
rm -r $CI_PROJECT_DIR/tests/robot/netbox_mac_address_plugin;
echo "Removed mac's tests.";
ls "$CI_PROJECT_DIR/tests/robot/";
fi
script:
- docker run --rm -v $CI_PROJECT_DIR:/project --network "host" robotframework:latest bash -c
Loading