Skip to content

Commit a347c43

Browse files
committed
address failures and pr comments
1 parent 7c96a07 commit a347c43

File tree

11 files changed

+18
-20
lines changed

11 files changed

+18
-20
lines changed

tests/integration/linodes/fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
)
1414
from tests.integration.linodes.helpers import (
1515
DEFAULT_LABEL,
16+
DEFAULT_LINODE_TYPE,
1617
DEFAULT_RANDOM_PASS,
18+
DEFAULT_REGION,
1719
DEFAULT_TEST_IMAGE,
1820
create_linode,
1921
create_linode_and_wait,

tests/integration/linodes/test_rebuild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
exec_test_command,
1010
retry_exec_test_command_with_delay,
1111
)
12-
from tests.integration.linodes.fixtures import ( # noqa: #401
12+
from tests.integration.linodes.fixtures import ( # noqa: F401
1313
linode_for_rebuild_tests,
1414
)
1515
from tests.integration.linodes.helpers import (

tests/integration/linodes/test_resize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
exec_failing_test_command,
99
exec_test_command,
1010
)
11-
from tests.integration.linodes.fixtures import ( # noqa: #401
11+
from tests.integration.linodes.fixtures import ( # noqa: F401
1212
linode_instance_for_resize_tests,
1313
)
1414
from tests.integration.linodes.helpers import (

tests/integration/lke/test_clusters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
get_random_text,
1212
retry_exec_test_command_with_delay,
1313
)
14-
from tests.integration.lke.fixtures import lke_cluster, node_pool # noqa: #401
14+
from tests.integration.lke.fixtures import lke_cluster, node_pool # noqa: F401
1515
from tests.integration.lke.helpers import (
1616
get_cluster_id,
1717
get_lke_version_id,

tests/integration/lke/test_lke_acl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
exec_test_command,
55
retry_exec_test_command_with_delay,
66
)
7-
from tests.integration.lke.fixtures import lke_cluster_acl # noqa: #401
7+
from tests.integration.lke.fixtures import lke_cluster_acl # noqa: F401
88

99

1010
def test_cluster_acl_view(lke_cluster_acl):

tests/integration/nodebalancers/test_node_balancers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
exec_failing_test_command,
99
exec_test_command,
1010
)
11-
from tests.integration.nodebalancers.fixtures import ( # noqa: #401
11+
from tests.integration.nodebalancers.fixtures import ( # noqa: F401
1212
linode_to_add,
1313
nodebalancer_w_config_and_node,
1414
nodebalancer_with_default_conf,

tests/integration/placements/test_placements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
exec_test_command,
55
get_random_text,
66
)
7-
from tests.integration.placements.fixtures import ( # noqa: #401
7+
from tests.integration.placements.fixtures import ( # noqa: F401
88
linode_for_placement_tests,
99
placement_group,
1010
)

tests/integration/regions/test_plugin_region_table.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77
)
88

99

10-
def test_output():
10+
def test_regions_table_output():
1111
output = exec_test_command(["linode-cli", "region-table"])
12-
lines = output.split("\n")
13-
lines = lines[3 : len(lines) - 2]
14-
for line in lines:
15-
assert "-" in line
16-
assert "✔" in line
17-
assert "│" in line
12+
assert "-" in output
13+
assert "✔" in output
14+
assert "│" in output
1815

1916

2017
def test_regions_list():

tests/integration/ssh/test_plugin_ssh.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
2-
import subprocess
32
from sys import platform
4-
from typing import Any, Dict, Optional
3+
from typing import Any, Dict
54

65
import pytest
76

@@ -91,12 +90,10 @@ def test_ssh_instance_ready(
9190
):
9291
pubkey, privkey = ssh_key_pair_generator
9392

94-
process: Optional[subprocess.CompletedProcess] = None
9593
instance_data = {}
9694

9795
def instance_poll_func():
9896
nonlocal instance_data
99-
nonlocal process
10097

10198
output = exec_test_command(
10299
BASE_CMDS["linodes"]
@@ -108,7 +105,7 @@ def instance_poll_func():
108105
return instance_data["status"] == "running"
109106

110107
def ssh_poll_func():
111-
exec_test_command(
108+
output = exec_test_command(
112109
BASE_CMDS["ssh"]
113110
+ [
114111
"root@" + instance_data["label"],
@@ -122,6 +119,8 @@ def ssh_poll_func():
122119
]
123120
)
124121

122+
return "hello world!" in output
123+
125124
# Wait for the instance to be ready
126125
wait_for_condition(
127126
POLL_INTERVAL, INSTANCE_WAIT_TIMEOUT_SECONDS, instance_poll_func

tests/integration/volumes/test_volumes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
exec_test_command,
1111
get_random_text,
1212
)
13-
from tests.integration.volumes.fixtures import volume_instance_id # noqa: #401
13+
from tests.integration.volumes.fixtures import volume_instance_id # noqa: F401
1414

1515

1616
def test_fail_to_create_volume_under_10gb():

0 commit comments

Comments
 (0)