Skip to content

Commit

Permalink
Merge branch 'dev' into TPT-3254-obj-plugin-missing-input-error
Browse files Browse the repository at this point in the history
  • Loading branch information
ezilber-akamai authored Dec 12, 2024
2 parents defad8f + 1f0928f commit 26c3955
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 40 deletions.
44 changes: 44 additions & 0 deletions tests/integration/account/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ def test_account_transfer():
assert_headers_in_lines(headers, lines)


def test_available_service():
res = (
exec_test_command(
BASE_CMD + ["get-availability", "--text", "--delimiter=,"]
)
.stdout.decode()
.rstrip()
)
lines = res.splitlines()

headers = ["region", "unavailable"]
assert_headers_in_lines(headers, lines)


def test_region_availability():
res = (
exec_test_command(
Expand Down Expand Up @@ -91,6 +105,36 @@ def test_event_view(get_event_id):
assert_headers_in_lines(headers, lines)


def test_event_read(get_event_id):
event_id = get_event_id
process = exec_test_command(
[
"linode-cli",
"events",
"mark-read",
event_id,
"--text",
"--delimiter=,",
]
)
assert process.returncode == 0


def test_event_seen(get_event_id):
event_id = get_event_id
process = exec_test_command(
[
"linode-cli",
"events",
"mark-seen",
event_id,
"--text",
"--delimiter=,",
]
)
assert process.returncode == 0


def test_account_invoice_list():
res = (
exec_test_command(
Expand Down
1 change: 0 additions & 1 deletion tests/integration/linodes/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

@pytest.fixture(scope="session", autouse=True)
def linode_instance_config_tests(linode_cloud_firewall):

linode_id = create_linode(
firewall_id=linode_cloud_firewall,
disk_encryption=False,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/linodes/test_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

@pytest.fixture(scope="session", autouse=True)
def linode_instance_disk_tests(linode_cloud_firewall):

linode_id = create_linode_and_wait(
firewall_id=linode_cloud_firewall,
disk_encryption=False,
Expand Down
38 changes: 0 additions & 38 deletions tests/integration/lke/test_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,44 +457,6 @@ def test_node_pool(test_lke_cluster):
yield node_pool_id


def test_pool_view(test_lke_cluster, test_node_pool):
cluster_id = test_lke_cluster

node_pool_id = test_node_pool

node_pool = (
exec_test_command(
BASE_CMD
+ [
"pool-view",
cluster_id,
node_pool_id,
"--text",
]
)
.stdout.decode()
.rstrip()
)

lines = node_pool.splitlines()

headers = [
"autoscaler.enabled",
"autoscaler.max",
"autoscaler.min",
"count",
"disk_encryption",
"id",
"labels.key",
"labels.value",
"tags",
"taints",
"type",
]

assert_headers_in_lines(headers, lines)


def test_update_autoscaler(test_lke_cluster, test_node_pool):
cluster_id = test_lke_cluster
node_pool_id = test_node_pool
Expand Down
19 changes: 19 additions & 0 deletions tests/integration/users/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,22 @@ def test_profile_token_list():
lines = res.splitlines()
headers = ["label", "scopes", "token"]
assert_headers_in_lines(headers, lines)


def test_sshkeys_list():
res = (
exec_test_command(
[
"linode-cli",
"sshkeys",
"list",
"--text",
"--delimiter=,",
]
)
.stdout.decode()
.rstrip()
)
lines = res.splitlines()
headers = ["label", "ssh_key"]
assert_headers_in_lines(headers, lines)

0 comments on commit 26c3955

Please sign in to comment.