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

Skip to content
Snippets Groups Projects
Verified Commit 6bf64753 authored by Vincent SIMONIN's avatar Vincent SIMONIN
Browse files

:green_heart: Print debug info of the hostname

parent 7337b80d
No related branches found
No related tags found
1 merge request!55⬆️ Upgrade Netbox version to v3.6.6
Pipeline #117492 failed
......@@ -44,9 +44,9 @@ run-test-job:
- pip install -r "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/requirements.e2e.txt"
- pip install -r "$CI_PROJECT_DIR/tests/requirements.e2e.txt"
script:
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest --junit-xml=tests-report-netbox-rps-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-rps-plugin/tests/"
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest --junit-xml=tests-report-netbox-cert-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/"
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest --junit-xml=tests-report-netbox-dist-plugin.xml "$CI_PROJECT_DIR/tests/e2e/"
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-rps-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-rps-plugin/tests/"
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-cert-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/"
- env HOST="$CI_COMMIT_SHORT_SHA.$HOSTNAME" PORT="$PORT" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-dist-plugin.xml "$CI_PROJECT_DIR/tests/e2e/"
after_script:
- env ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_PRIVATE_KEY_FILE="$ANSIBLE_PRIVATE_KEY_FILE" ansible-playbook -i "$TESTING_HOSTS" -u debian ansible/halt_test.yml
- deactivate
......
......@@ -4,6 +4,7 @@ import time
import unittest
import json
import os
import socket
import requests
......@@ -158,6 +159,7 @@ class TestCertificateCreation(unittest.TestCase):
)
time.sleep(2)
print(socket.gethostbyname_ex(HOST))
if __name__ == "__main__":
......
......@@ -3,8 +3,10 @@
import os
import time
import unittest
import socket
import requests
HOST = os.getenv("HOST", default="localhost")
PORT = os.getenv("PORT", default="8080")
API_KEY = os.getenv("API_KEY", "only4testingpurpose")
......@@ -27,3 +29,4 @@ class Base(unittest.TestCase):
)
time.sleep(2)
print(socket.gethostbyname_ex(HOST))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment