diff options
author | James Falcon <therealfalcon@gmail.com> | 2021-09-17 16:25:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 16:25:22 -0500 |
commit | dc22786980a05129c5971e68ae37b1a9f76f882d (patch) | |
tree | 6c1e1438b6ce26574769b18f289752324bfc4189 /tests/integration_tests | |
parent | 612e39087aee3b1242765e7c4f463f54a6ebd723 (diff) | |
download | vyos-cloud-init-dc22786980a05129c5971e68ae37b1a9f76f882d.tar.gz vyos-cloud-init-dc22786980a05129c5971e68ae37b1a9f76f882d.zip |
Set Azure to apply networking config every BOOT (#1023)
In #1006, we set Azure to apply networking config every
BOOT_NEW_INSTANCE because the BOOT_LEGACY option was causing problems
applying networking the second time per boot. However,
BOOT_NEW_INSTANCE is also wrong as Azure needs to apply networking
once per boot, during init-local phase.
Diffstat (limited to 'tests/integration_tests')
-rw-r--r-- | tests/integration_tests/modules/test_user_events.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/integration_tests/modules/test_user_events.py b/tests/integration_tests/modules/test_user_events.py index ee8f05ae..fffa0746 100644 --- a/tests/integration_tests/modules/test_user_events.py +++ b/tests/integration_tests/modules/test_user_events.py @@ -31,8 +31,6 @@ def _add_dummy_bridge_to_netplan(client: IntegrationInstance): @pytest.mark.gce @pytest.mark.oci @pytest.mark.openstack -@pytest.mark.azure -@pytest.mark.not_xenial def test_boot_event_disabled_by_default(client: IntegrationInstance): log = client.read_from_file('/var/log/cloud-init.log') if 'network config is disabled' in log: @@ -77,7 +75,7 @@ def _test_network_config_applied_on_reboot(client: IntegrationInstance): assert 'dummy0' not in client.execute('ls /sys/class/net') _add_dummy_bridge_to_netplan(client) - client.execute('rm /var/log/cloud-init.log') + client.execute('echo "" > /var/log/cloud-init.log') client.restart() log = client.read_from_file('/var/log/cloud-init.log') @@ -92,6 +90,11 @@ def _test_network_config_applied_on_reboot(client: IntegrationInstance): assert 'dummy0' not in client.execute('ls /sys/class/net') +@pytest.mark.azure +def test_boot_event_enabled_by_default(client: IntegrationInstance): + _test_network_config_applied_on_reboot(client) + + USER_DATA = """\ #cloud-config updates: @@ -100,7 +103,6 @@ updates: """ -@pytest.mark.not_xenial @pytest.mark.user_data(USER_DATA) def test_boot_event_enabled(client: IntegrationInstance): _test_network_config_applied_on_reboot(client) |