diff --git a/test/integration/linode_client/test_linode_client.py b/test/integration/linode_client/test_linode_client.py index 4f8f97f4a..105535211 100644 --- a/test/integration/linode_client/test_linode_client.py +++ b/test/integration/linode_client/test_linode_client.py @@ -87,6 +87,7 @@ def test_get_regions(test_linode_client): @pytest.mark.smoke +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_image_create(setup_client_and_linode): client = setup_client_and_linode[0] linode = setup_client_and_linode[1] diff --git a/test/integration/models/image/test_image.py b/test/integration/models/image/test_image.py index bfb958921..4c2aa77d2 100644 --- a/test/integration/models/image/test_image.py +++ b/test/integration/models/image/test_image.py @@ -74,6 +74,7 @@ def test_image_create_upload(test_linode_client, test_uploaded_image): @pytest.mark.smoke +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_image_replication(test_linode_client, test_uploaded_image): uploaded_image, regions = test_uploaded_image diff --git a/test/integration/models/linode/test_linode.py b/test/integration/models/linode/test_linode.py index dd8907c0e..d6b272d9b 100644 --- a/test/integration/models/linode/test_linode.py +++ b/test/integration/models/linode/test_linode.py @@ -312,6 +312,7 @@ def test_linode_boot(create_linode): assert linode.status == "running" +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_linode_resize(create_linode_for_long_running_tests): linode = create_linode_for_long_running_tests @@ -590,6 +591,7 @@ def test_get_linode_types_overrides(test_linode_client): assert linode_type.region_prices[0].monthly >= 0 +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_save_linode_noforce(test_linode_client, create_linode): linode = create_linode old_label = linode.label @@ -601,6 +603,7 @@ def test_save_linode_noforce(test_linode_client, create_linode): assert old_label != linode.label +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_save_linode_force(test_linode_client, create_linode): linode = create_linode old_label = linode.label diff --git a/test/integration/models/lke/test_lke.py b/test/integration/models/lke/test_lke.py index eb31c8eb6..f4f92f921 100644 --- a/test/integration/models/lke/test_lke.py +++ b/test/integration/models/lke/test_lke.py @@ -277,6 +277,7 @@ def test_lke_cluster_acl(lke_cluster_with_acl): assert not cluster.control_plane_acl.enabled +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_lke_cluster_labels_and_taints(lke_cluster_with_labels_and_taints): pool = lke_cluster_with_labels_and_taints.pools[0] diff --git a/test/integration/models/profile/test_profile.py b/test/integration/models/profile/test_profile.py index cafec12ea..b57c8de17 100644 --- a/test/integration/models/profile/test_profile.py +++ b/test/integration/models/profile/test_profile.py @@ -1,3 +1,5 @@ +import pytest + from linode_api4.objects import PersonalAccessToken, Profile, SSHKey @@ -18,6 +20,7 @@ def test_get_personal_access_token_objects(test_linode_client): assert isinstance(personal_access_tokens[0], PersonalAccessToken) +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_get_sshkeys(test_linode_client, test_sshkey): client = test_linode_client @@ -29,6 +32,7 @@ def test_get_sshkeys(test_linode_client, test_sshkey): assert test_sshkey.label in ssh_labels +@pytest.mark.flaky(reruns=3, reruns_delay=2) def test_ssh_key_create(test_sshkey, ssh_key_gen): pub_key = ssh_key_gen[0] key = test_sshkey diff --git a/tox.ini b/tox.ini index 209db7170..266c26717 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ deps = mock pylint httpretty + pytest-rerunfailures commands = python -m pip install . coverage run --source linode_api4 -m pytest test/unit