mirror of
https://github.com/rancher/os.git
synced 2025-09-16 23:21:19 +00:00
Fix DHCP hostname being overwritten
This commit is contained in:
21
tests/integration/rostest/test_12_dhcp_hostname.py
Normal file
21
tests/integration/rostest/test_12_dhcp_hostname.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import pytest
|
||||
import rostest.util as u
|
||||
from rostest.util import SSH
|
||||
|
||||
ssh_command = ['./scripts/ssh', '--qemu', '--key', './tests/integration/assets/test.key']
|
||||
cloud_config_path = './tests/integration/assets/test_12/cloud-config.yml'
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def qemu(request):
|
||||
q = u.run_qemu(request, ['--cloud-config', cloud_config_path])
|
||||
u.flush_out(q.stdout)
|
||||
return q
|
||||
|
||||
|
||||
@pytest.mark.timeout(40)
|
||||
def test_dhcp_hostname(qemu):
|
||||
SSH(qemu, ssh_command).check_call('''
|
||||
hostname | grep rancher-dev
|
||||
cat /etc/hosts | grep rancher-dev
|
||||
''')
|
Reference in New Issue
Block a user