Skip to content

Commit

Permalink
apply comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Nov 28, 2024
1 parent 84ca6b9 commit 74d2c8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/integration/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Generator, Iterator, List, Optional, Union

import pytest
from test_util import config, harness, util, tags
from test_util import config, harness, tags, util
from test_util.etcd import EtcdCluster
from test_util.registry import Registry

Expand All @@ -30,8 +30,8 @@ def pytest_itemcollected(item):
tag.args[0] in tags.TEST_LEVELS for tag in marked_tags
):
pytest.fail(
f"The test {item.nodeid} does not have one of the test level tags ({", ".join(tags.TEST_LEVELS)})."
f"Please add at least one test-level tag using @pytest.mark.tags."
f"The test {item.nodeid} does not have one of the test level tags."
f"Please add at least one test-level tag using @pytest.mark.tags ({tags.TEST_LEVELS})."
)


Expand Down
4 changes: 1 addition & 3 deletions tests/integration/tests/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,20 @@ def test_skip_services_stop_on_remove(instances: List[harness.Instance]):
services = joining_cp.exec(
["snap", "services", "k8s"], capture_output=True, text=True
).stdout.split("\n")[1:-1]
print(services)
for service in services:
if "k8s-apiserver-proxy" in service:
assert (
" inactive " in service
), "apiserver proxy should be inactive on control-plane"
else:
assert " active " in service, "service should be active"
assert " active " in service, f"'{service}' should be active"

cluster_node.exec(["k8s", "remove-node", worker.id])
nodes = util.ready_nodes(cluster_node)
assert len(nodes) == 1, "worker node should have been removed from the cluster"
services = worker.exec(
["snap", "services", "k8s"], capture_output=True, text=True
).stdout.split("\n")[1:-1]
print(services)
for service in services:
for expected_active_service in [
"containerd",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tests/test_strict_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@pytest.mark.skipif(
not config.STRICT_INTERFACE_CHANNELS, reason="No strict channels configured"
)
@pytest.mark.tags(tags.NIGHTLY)
@pytest.mark.tags(tags.WEEKLY)
def test_strict_interfaces(instances: List[harness.Instance], tmp_path):
channels = config.STRICT_INTERFACE_CHANNELS
cp = instances[0]
Expand Down
1 change: 0 additions & 1 deletion tests/integration/tests/test_util/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
from pytest_tagging import combine_tags


PULL_REQUEST = "pull_request"
NIGHTLY = "nightly"
WEEKLY = "weekly"
Expand Down

0 comments on commit 74d2c8a

Please sign in to comment.