Skip to content

Commit

Permalink
Update upgrade test to account for dhcp6
Browse files Browse the repository at this point in the history
Fallback network configuration changed in 518047a
  • Loading branch information
TheRealFalcon authored and aciba90 committed Oct 12, 2023
1 parent 0cf010e commit a0f53bd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os

import pytest
import yaml

from tests.integration_tests.clouds import IntegrationCloud
from tests.integration_tests.conftest import get_validated_source
Expand Down Expand Up @@ -137,7 +138,18 @@ def test_clean_boot_of_upgraded_package(session_cloud: IntegrationCloud):
assert post_json["v1"]["datasource"].startswith(
"DataSourceAzure"
)
assert pre_network == post_network
if PLATFORM == "gce":
# GCE regenerates network config per boot AND
# GCE uses fallback config AND
# #4474 changed fallback configuration.
# Once the baseline includes #4474, this can be removed
pre_network = yaml.load(pre_network, Loader=yaml.Loader)
post_network = yaml.load(post_network, Loader=yaml.Loader)
for values in post_network["network"]["ethernets"].values():
values.pop("dhcp6")
assert yaml.dump(pre_network) == yaml.dump(post_network)
else:
assert pre_network == post_network

# Calculate and log all the boot numbers
pre_analyze_totals = [
Expand Down

0 comments on commit a0f53bd

Please sign in to comment.