Skip to content

Commit 89043d1

Browse files
debug debug
1 parent a9358f4 commit 89043d1

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/e2e/shared/aws.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,21 @@ func deleteCloudFormationStack(prov client.ConfigProvider, t *cfn_bootstrap.Temp
774774
}
775775

776776
func ensureTestImageUploaded(e2eCtx *E2EContext) error {
777+
By("ensureTestImageUploaded: Creating AWS session for ECR Public")
777778
sessionForRepo := NewAWSSessionRepoWithKey(e2eCtx.Environment.BootstrapAccessKey)
778779

780+
if sess, ok := sessionForRepo.(*session.Session); ok {
781+
creds, err := sess.Config.Credentials.Get()
782+
if err != nil {
783+
By(fmt.Sprintf("ensureTestImageUploaded: Failed to get credentials from session: %v", err))
784+
return fmt.Errorf("failed to get credentials: %w", err)
785+
}
786+
By(fmt.Sprintf("ensureTestImageUploaded: Session credentials - AccessKeyId: %s, ProviderName: %s",
787+
creds.AccessKeyID, creds.ProviderName))
788+
} else {
789+
By("ensureTestImageUploaded: WARNING: Session is not *session.Session type")
790+
}
791+
779792
ecrSvc := ecrpublic.New(sessionForRepo)
780793
repoName := ""
781794
if err := wait.WaitForWithRetryable(wait.NewBackoff(), func() (bool, error) {

test/e2e/shared/suite.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
158158
e2eCtx.Environment.BootstrapAccessKey = newUserAccessKey(context.TODO(), e2eCtx.AWSSessionV2, bootstrapTemplate.Spec.BootstrapUser.UserName)
159159
e2eCtx.BootstrapUserAWSSession = NewAWSSessionWithKey(e2eCtx.Environment.BootstrapAccessKey)
160160
e2eCtx.BootstrapUserAWSSessionV2 = NewAWSSessionWithKeyV2(e2eCtx.Environment.BootstrapAccessKey)
161+
162+
By("Waiting for access key to propagate...")
163+
time.Sleep(10 * time.Second)
164+
161165
Expect(ensureTestImageUploaded(e2eCtx)).NotTo(HaveOccurred())
162166

163167
// Image ID is needed when using a CI Kubernetes version. This is used in conformance test and upgrade to main test.

0 commit comments

Comments
 (0)