MT#16755 Add support SKIP_DNS_CHECK_TEST and SKIP_STRICT_HOSTNAME_TEST env variables

The Jenkins test 'netinstall-test-ngcp-installer' restores plain Debian VM
and install NGCP using ngcp-installer only.

In this case the test should skip some strict host/names checks.

Change-Id: I9b84784ebed0a54ff51aa2baef274f5466879352
changes/45/4245/3
Alexander Lutay 10 years ago
parent 6e97e15355
commit bdf0d12f07

@ -1,5 +1,9 @@
{
"command": {
"hostname": {
"exit-status": "0"
},
[% IF sipwise.system_tester.skip_strict_hostname_test != "true" %]
"hostname": {
"exit-status": "0",
"stdout": [
@ -21,6 +25,7 @@
],
"stderr": []
},
[% END -%]
"[ $(hostname --short). = $(hostname --fqdn) ]": {
"comment": "short hostname should be the same as fqdn (ignoring trailing dot)",
"exit-status": "0",

@ -1,18 +1,20 @@
{
"dns": {
"localhost": {
"resolveable": true,
"addrs": [
"127.0.0.1"
],
"timeout": 500
},
[% IF sipwise.system_tester.skip_dns_check_test != "true" -%]
"spce": {
"resolveable": true,
"addrs": [
"127.0.0.2"
],
"timeout": 500
},
[% END -%]
"localhost": {
"resolveable": true,
"addrs": [
"127.0.0.1"
],
"timeout": 500
}
}
}

@ -1,5 +1,9 @@
{
"command": {
"hostname": {
"exit-status": "0"
},
[% IF sipwise.system_tester.skip_strict_hostname_test != "true" %]
"hostname": {
"exit-status": "0",
"stdout": [
@ -21,6 +25,7 @@
],
"stderr": []
},
[% END -%]
"[ $(hostname --short) = $(hostname --fqdn) ]": {
"comment": "short hostname should be the same as fqdn (ignoring trailing dot)",
"exit-status": "0",

@ -1,25 +1,27 @@
{
"dns": {
"localhost": {
[% IF sipwise.system_tester.skip_dns_check_test != "true" -%]
"sp1": {
"resolveable": true,
"addrs": [
"127.0.0.1"
"192.168.255.251"
],
"timeout": 500
},
"sp1": {
"sp2": {
"resolveable": true,
"addrs": [
"192.168.255.251"
"192.168.255.252"
],
"timeout": 500
},
"sp2": {
[% END -%]
"localhost": {
"resolveable": true,
"addrs": [
"192.168.255.252"
"127.0.0.1"
],
"timeout": 500
}
}
}
}

@ -26,6 +26,21 @@ if [ ! -x /usr/sbin/goss ] ; then
chmod +x /usr/sbin/goss
fi
host_yml_file="/etc/ngcp-config/config.$(hostname).yml"
if [ -n "${SKIP_DNS_CHECK_TEST}" ] || [ -n "${SKIP_STRICT_HOSTNAME_TEST}" ] ; then
echo "Configuring host specific YML config: ${host_yml_file}"
cat > "${host_yml_file}" << EOF
---
sipwise:
system_tester:
skip_dns_check_test: ${SKIP_DNS_CHECK_TEST:-false}
skip_strict_hostname_test: ${SKIP_STRICT_HOSTNAME_TEST:-false}
EOF
else
# remove the file if exist from the previous run
rm -f "${host_yml_file}"
fi
echo "Rebuilding test configs in /etc/ngcp-test/"
ngcpcfg build /etc/ngcp-test/*
@ -42,3 +57,4 @@ else
echo "not ok 1 - found errors, run test manually" >> "${TAP_RESULTS}"
fi
rm -f "${host_yml_file}"

Loading…
Cancel
Save