Skip to content

Commit

Permalink
tests/kola/ignition: test intra-cloud anonymous S3/GCS object fetching
Browse files Browse the repository at this point in the history
Have ext.config.ignition.resource.remote use the new noInstanceCreds flag
to disable instance credentials in EC2 and GCE instances, so the test
fetches resources anonymously.  Move the checks for authenticated access
of public objects into the authenticated-* tests.
  • Loading branch information
bgilbert committed May 10, 2022
1 parent d894957 commit d6e7f7c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/kola/ignition/resource/authenticated-gs/config.bu
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ ignition:
- source: "gs://ignition-test-fixtures/resources/authenticated-var.ign"
storage:
files:
# Check that anonymous access works with credentials
- path: /var/resource/gs-anon
contents:
source: "gs://ignition-test-fixtures/resources/anonymous"
- path: /var/resource/gs-auth
contents:
source: "gs://ignition-test-fixtures/resources/authenticated"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kola-anonymous
4 changes: 4 additions & 0 deletions tests/kola/ignition/resource/authenticated-s3/config.bu
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ ignition:
- source: "s3://ignition-test-fixtures/resources/authenticated-var-v3.ign"
storage:
files:
# Check that anonymous access works with credentials
- path: /var/resource/s3-anon
contents:
source: "s3://ignition-test-fixtures/resources/anonymous"
- path: /var/resource/s3-auth
contents:
source: "s3://ignition-test-fixtures/resources/authenticated"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kola-anonymous
6 changes: 5 additions & 1 deletion tests/kola/ignition/resource/remote/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash
# kola: { "tags": "needs-internet" }
# kola: { "tags": "needs-internet", "noInstanceCreds": true }
# - tags: needs-internet
# - We fetch resources from S3.
# - noInstanceCreds: don't pass AWS or GCP credentials to instance
# - This test verifies that Ignition can fetch anonymous resources within
# a cloud platform (S3 -> EC2, GCS -> GCE) when no credentials are
# supplied

set -xeuo pipefail

Expand Down

0 comments on commit d6e7f7c

Please sign in to comment.