diff --git a/features/base/test/test_metadata_connection.py b/features/base/test/test_metadata_connection.py index dae781317..554e257b7 100644 --- a/features/base/test/test_metadata_connection.py +++ b/features/base/test/test_metadata_connection.py @@ -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(