Skip to content

Commit

Permalink
Ignore aws specific test on gcp (gardenlinux#2179)
Browse files Browse the repository at this point in the history
* Ignore aws specific test on gcp

* Refactor the test to only apply for aws

Signed-off-by: Akendo <akendo@akendo.eu>

* fix typo

Signed-off-by: Akendo <akendo@akendo.eu>

---------

Signed-off-by: Akendo <akendo@akendo.eu>
Co-authored-by: Akendo <akendo@akendo.eu>
  • Loading branch information
fwilhe and Akendo authored Jun 28, 2024
1 parent ef453bf commit b4982d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion features/base/test/test_metadata_connection.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import pytest
from helper.sshclient import RemoteClient

def test_metadata_connection(client, non_aws, non_azure, non_ali, non_chroot, non_kvm):
metadata_host = "169.254.169.254"
(exit_code, output, error) = client.execute_command(
f"wget --timeout 5 'http://{metadata_host}/'"
)
assert exit_code == 0, f"no {error=} expected"
assert f"Connecting to {metadata_host}:80... connected." in error
assert "200 OK" in error

def test_metadata_connection(client, non_azure, non_ali, non_chroot, non_kvm):
def test_metadata_connection_aws(client, aws):
metadata_host = "169.254.169.254"
# request the IMDSv2 token to allow access to the metadata_host on AWS.
(exit_code, token, error) = client.execute_command(
Expand Down

0 comments on commit b4982d5

Please sign in to comment.