Skip to content

Commit 22e1778

Browse files
authored
test: remove unnecessary warnings when running integration tests (#392)
* Remove warnings and additional fixture for stability * make format * address other warning
1 parent 37fbc5e commit 22e1778

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ testunit:
7575

7676
.PHONY: smoketest
7777
smoketest:
78-
$(PYTHON) -m pytest -m smoke test/integration --disable-warnings
78+
$(PYTHON) -m pytest -m smoke test/integration

test/integration/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,3 +341,10 @@ def create_multiple_vpcs(test_linode_client):
341341
vpc_1.delete()
342342

343343
vpc_2.delete()
344+
345+
346+
@pytest.mark.smoke
347+
def pytest_configure(config):
348+
config.addinivalue_line(
349+
"markers", "smoke: mark test as part of smoke test suite"
350+
)

test/integration/linode_client/test_linode_client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_get_account(setup_client_and_linode):
3131
assert re.search("^$|[a-zA-Z]+", account.first_name)
3232
assert re.search("^$|[a-zA-Z]+", account.last_name)
3333
assert re.search(
34-
"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$", account.email
34+
"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", account.email
3535
)
3636
assert re.search("^$|[a-zA-Z0-9]+", account.address_1)
3737
assert re.search("^$|[a-zA-Z0-9]+", account.address_2)
@@ -401,9 +401,6 @@ def test_keys_create(test_linode_client, ssh_keys_object_storage):
401401

402402
# NetworkingGroupTests
403403

404-
# TODO:: creating vlans
405-
# def test_get_vlans():
406-
407404

408405
@pytest.fixture
409406
def create_firewall_with_inbound_outbound_rules(test_linode_client):

test/integration/models/test_linode.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def linode_for_disk_tests(test_linode_client):
114114
linode_instance.delete()
115115

116116

117-
@pytest.mark.smoke
118117
@pytest.fixture
119118
def create_linode_for_long_running_tests(test_linode_client):
120119
client = test_linode_client
@@ -372,7 +371,6 @@ def wait_for_disk_status(disk: Disk, timeout):
372371
raise TimeoutError("Wait for condition timeout error")
373372

374373

375-
@pytest.mark.dependency()
376374
def test_disk_resize_and_duplicate(test_linode_client, linode_for_disk_tests):
377375
linode = linode_for_disk_tests
378376

@@ -396,7 +394,6 @@ def test_disk_resize_and_duplicate(test_linode_client, linode_for_disk_tests):
396394
assert dup_disk.linode_id == linode.id
397395

398396

399-
@pytest.mark.dependency(depends=["test_disk_resize_and_duplicate"])
400397
def test_linode_create_disk(test_linode_client, linode_for_disk_tests):
401398
linode = test_linode_client.load(Instance, linode_for_disk_tests.id)
402399

0 commit comments

Comments
 (0)