diff --git a/ngcp-system-tests b/ngcp-system-tests index 7005b56..29ee177 100755 --- a/ngcp-system-tests +++ b/ngcp-system-tests @@ -96,7 +96,6 @@ case "${NGCP_TESTS_MODE}" in trap 'rm -f "${VARS}"' EXIT cat >"${VARS}" <<-EOF SKIP_DNS_CHECK_TEST: ${SKIP_DNS_CHECK_TEST:-false} -SKIP_STRICT_HOSTNAME_TEST: ${SKIP_STRICT_HOSTNAME_TEST:-false} NODE_ACTIVE: ${NODE_ACTIVE} EOF diff --git a/templates/800_network-hostname.yaml.tt2 b/templates/800_network-hostname.yaml.tt2 index 658144a..272cf00 100644 --- a/templates/800_network-hostname.yaml.tt2 +++ b/templates/800_network-hostname.yaml.tt2 @@ -1,13 +1,10 @@ [%- IF general.ngcp_type == 'spce'; - host_match = "spce"; - fqdn_match = "spce."; + ngcp_hostname_match = "spce"; ELSIF general.ngcp_type == 'sppro'; - host_match = "/sp[12]/"; - fqdn_match = "/sp[12]/"; + ngcp_hostname_match = "/sp[12]/"; ELSE; - host_match = "/[a-z]+[0-9]{2}[ab]/"; - fqdn_match = "/sp[12]/"; + ngcp_hostname_match = "/[a-z]+[0-9]{2}[ab]/"; END; -%] @@ -15,48 +12,8 @@ command: hostname: exit-status: 0 -{{if not .Vars.SKIP_STRICT_HOSTNAME_TEST}} - hostname: - exit-status: 0 - stdout: - - "[% host_match %]" - stderr: [] - - "hostname --fqdn": + ngcp-hostname: exit-status: 0 stdout: - - "[% fqdn_match %]" - stderr: [] - - "hostname --short": - exit-status: 0 - stdout: - - "[% host_match %]" - stderr: [] - -{{end}} -[% IF general.ngcp_type == 'spce' -%] - "[ $(hostname --short). = $(hostname --fqdn) ]": - title: "short hostname should be the same as fqdn (ignoring trailing dot)" - exit-status: 0 - stdout: [] - stderr: [] -[% ELSIF general.ngcp_type == 'sppro' -%] - "[ $(hostname --short) = $(hostname --fqdn) ]": - title: "short hostname should be the same as fqdn" - exit-status: 0 - stdout: [] - stderr: [] -[% ELSIF general.ngcp_type == 'carrier' -%] - "[ $(hostname --short) = $(cat /etc/hostname) ]": - title: "short hostname should be the same as /etc/hostname" - exit-status: 0 - stdout: [] - stderr: [] - -[% END -%] - "[ $(resolveip -s $(hostname --fqdn)) = $(resolveip -s $(hostname --short)) ]": - title: "ip-s of short hostname and fqdn should be the same" - exit-status: 0 - stdout: [] + - "[% ngcp_hostname_match %]" stderr: []