Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def pytest_configure(config):
)


@pytest.fixture
@pytest.fixture(scope="module")
def support_test_linode_id(linode_cloud_firewall):
timestamp = str(time.time_ns())
label = "cli" + timestamp
Expand Down
56 changes: 23 additions & 33 deletions tests/integration/placements/test_placements.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
BASE_CMD = ["linode-cli", "placement"]


@pytest.fixture
@pytest.fixture(scope="module")
def create_placement_group():
new_label = str(time.time_ns()) + "label"
placement_group_id = (
Expand Down Expand Up @@ -68,50 +68,40 @@ def test_placement_group_view(create_placement_group):
assert_headers_in_lines(headers, lines)


@pytest.mark.skip(reason="BUG TPT-3109")
def test_assign_placement_group(support_test_linode_id, create_placement_group):
linode_id = support_test_linode_id
placement_group_id = create_placement_group
res = (
exec_test_command(
BASE_CMD
+ [
"assign-linode",
placement_group_id,
"--linodes",
linode_id,
"--text",
"--delimiter=,",
]
)
.stdout.decode()
.rstrip()
process = exec_test_command(
BASE_CMD
+ [
"assign-linode",
placement_group_id,
"--linode",
linode_id,
"--text",
"--delimiter=,",
]
)
assert placement_group_id in res
assert process.returncode == 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi, returncode assertion is done in exec_command function. Can we have different set of assertions that linode actually got assigned?



@pytest.mark.skip(reason="BUG TPT-3109")
def test_unassign_placement_group(
support_test_linode_id, create_placement_group
):
linode_id = support_test_linode_id
placement_group_id = create_placement_group
res = (
exec_test_command(
BASE_CMD
+ [
"unassign-linode",
placement_group_id,
"--linode",
linode_id,
"--text",
"--delimiter=,",
]
)
.stdout.decode()
.rstrip()
process = exec_test_command(
BASE_CMD
+ [
"unassign-linode",
placement_group_id,
"--linode",
linode_id,
"--text",
"--delimiter=,",
]
)
assert placement_group_id not in res
assert process.returncode == 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we verify that linode is un-assigned?



def test_update_placement_group(create_placement_group):
Expand Down
Loading