Skip to content

Commit

Permalink
tests/misc-ro: generalize NIC naming test
Browse files Browse the repository at this point in the history
Instead of checking for `ens` on QEMU, just check that the interface
name *isn't* `eth*`. This should be cross-platform, so we can drop the
`systemd-run` wrapper.
  • Loading branch information
jlebon committed Jul 14, 2020
1 parent 88bc228 commit 7c40c93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/kola/misc-ro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# This is a place to put random quick read-only tests.
set -euo pipefail
set -xeuo pipefail

ok() {
echo "ok" "$@"
Expand All @@ -15,5 +15,7 @@ systemctl is-enabled logrotate.service
ok logrotate

# https://github.com/coreos/fedora-coreos-config/commit/2a5c2abc796ac645d705700bf445b50d4cda8f5f
systemd-run -P -p ConditionVirtualization=kvm --wait /bin/sh -c 'set -euo pipefail; ip link | grep -o -e " ens[0-9]:"'
if ip link | grep -o -e " eth[0-9]:"; then
fatal "detected eth* NIC naming on node"
fi
ok nic naming

0 comments on commit 7c40c93

Please sign in to comment.