Skip GCP tests if the GCP environment variables aren't set
This commit is contained in:
parent
86fc6dc6ff
commit
6521f0e9f9
1 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ from fedora_image_uploader import Uploader
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_image_filter(fixtures_dir):
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -66,6 +67,7 @@ def test_image_filter(fixtures_dir):
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_messages(fixtures_dir):
|
||||
with open(os.path.join(fixtures_dir, "messages/rc_compose_40.json")) as fd:
|
||||
msg = message.load_message(json.load(fd))
|
||||
|
|
@ -138,6 +140,7 @@ def test_messages(fixtures_dir):
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_import_image(fixtures_dir):
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -252,6 +255,7 @@ def test_import_image(fixtures_dir):
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_promote_image_eln_rawhide():
|
||||
"""Assert this is a no-op for eln and rawhide"""
|
||||
consumer = Uploader()
|
||||
|
|
@ -304,6 +308,7 @@ def test_promote_image_eln_rawhide():
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_needs_promotion():
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -365,6 +370,7 @@ def test_needs_promotion():
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_no_promotion():
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -417,6 +423,7 @@ def test_no_promotion():
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_cleanup_skips_unmanaged_images():
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -447,6 +454,7 @@ def test_cleanup_skips_unmanaged_images():
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_cleanup_rawhide():
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
@ -507,6 +515,7 @@ def test_cleanup_rawhide():
|
|||
},
|
||||
},
|
||||
)
|
||||
@pytest.mark.skipif(not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS"), reason="GCP tests require GCP credentials")
|
||||
def test_cleanup_eol():
|
||||
consumer = Uploader()
|
||||
handler = consumer.handlers["gcp"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue