Skip to content

Commit

Permalink
remove ipv6 test for ip6 only infra
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Nov 8, 2024
1 parent adca07f commit 0497939
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 69 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -106,6 +102,11 @@ jobs:
TEST_SUBSTRATE: lxd
TEST_LXD_IMAGE: ${{ matrix.os }}
TEST_INSPECTION_REPORTS_DIR: ${{ github.workspace }}/inspection-reports
# Test the latest (up to) 6 releases for the flavour
# TODO(ben): upgrade nightly to run all flavours
TEST_VERSION_UPGRADE_CHANNELS: "recent 6 classic"
# Upgrading from 1.30 is not supported.
TEST_VERSION_UPGRADE_MIN_RELEASE: "1.31"
run: |
cd tests/integration && sg lxd -c 'tox -e integration'
- name: Prepare inspection reports
Expand Down
65 changes: 0 additions & 65 deletions tests/integration/tests/test_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,68 +121,3 @@ def test_ipv6_only_on_dualstack_infra(instances: List[harness.Instance]):
util.stubbornly(retries=config.DEFAULT_WAIT_RETRIES, delay_s=20).until(
util.ready_nodes(main) == 3
)


@pytest.mark.node_count(3)
@pytest.mark.disable_k8s_bootstrapping()
@pytest.mark.network_type("ipv6")
def test_ipv6_only_on_ipv6_infra(instances: List[harness.Instance]):
main = instances[0]
joining_cp = instances[1]
joining_worker = instances[2]

ipv6_bootstrap_config = (
config.MANIFESTS_DIR / "bootstrap-ipv6-only.yaml"
).read_text()

main.exec(
["k8s", "bootstrap", "--file", "-"],
input=str.encode(ipv6_bootstrap_config),
)

join_token = util.get_join_token(main, joining_cp)
joining_cp.exec(["k8s", "join-cluster", join_token])

join_token_worker = util.get_join_token(main, joining_worker, "--worker")
joining_worker.exec(["k8s", "join-cluster", join_token_worker])

# Deploy nginx with ipv6 service
ipv6_config = (config.MANIFESTS_DIR / "nginx-ipv6-only.yaml").read_text()
main.exec(["k8s", "kubectl", "apply", "-f", "-"], input=str.encode(ipv6_config))
addresses = (
util.stubbornly(retries=5, delay_s=3)
.on(main)
.exec(
[
"k8s",
"kubectl",
"get",
"svc",
"nginx-ipv6",
"-o",
"jsonpath='{.spec.clusterIPs[*]}'",
],
text=True,
capture_output=True,
)
.stdout
)

for ip in addresses.split():
addr = ip_address(ip.strip("'"))
if isinstance(addr, IPv6Address):
address = f"http://[{str(addr)}]"
elif isinstance(addr, IPv4Address):
assert False, "IPv4 address found in IPv6-only cluster"
else:
pytest.fail(f"Unknown IP address type: {addr}")

# need to shell out otherwise this runs into permission errors
util.stubbornly(retries=3, delay_s=1).on(main).exec(
["curl", address], shell=True
)

# This might take a while
util.stubbornly(retries=config.DEFAULT_WAIT_RETRIES, delay_s=20).until(
util.ready_nodes(main) == 3
)

0 comments on commit 0497939

Please sign in to comment.