From 3026a7779e52931b285e6ab877016d7c3c5aa43d Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Fri, 6 Dec 2024 12:51:29 -0800 Subject: [PATCH] remove comments --- .github/workflows/functional-test-cloud.yaml | 20 ++++---------------- test/validation/aws.go | 1 - 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/functional-test-cloud.yaml b/.github/workflows/functional-test-cloud.yaml index 9ef8216b49..8eeb2ef470 100644 --- a/.github/workflows/functional-test-cloud.yaml +++ b/.github/workflows/functional-test-cloud.yaml @@ -550,17 +550,16 @@ jobs: with: version: ${{ env.HELM_VER }} - #this step is to configure the aws credentials for github actions. - #The role-to-assume is the role that the github action will assume to execute aws commands. + # The role-to-assume is the role that the github action will assume to execute aws commands and + # construct cloud control client in test code. - name: configure aws credentials using assumed role uses: aws-actions/configure-aws-credentials@v1.7.0 with: - role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/radius_func_test #TODO: change to reflect ARN of the role to assume craeted in functional test account + role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/radius_func_test role-session-name: GitHub_to_AWS_via_FederatedOIDC aws-region: ${{ env.AWS_REGION }} - # create kind cluster with OIDC provider. - + # create kind cluster with OIDC provider. - name: Create KinD cluster run: | curl -sSLo "kind" "https://github.com/kubernetes-sigs/kind/releases/download/${{ env.KIND_VER }}/kind-linux-amd64" @@ -571,10 +570,6 @@ jobs: # AZURE_OIDC_ISSUER_PRIVATE_KEY eval "export $(echo "${{ secrets.FUNCTEST_AZURE_OIDC_JSON }}" | jq -r 'to_entries | map("\(.key)=\(.value)") | @sh')" - echo "oidc issuer for cluster" - echo $AZURE_OIDC_ISSUER - - AUTHKEY=$(echo -n "${{ github.actor }}:${{ secrets.GH_RAD_CI_BOT_PAT }}" | base64) echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"${AUTHKEY}\"}}}" > "./ghcr_secret.json" @@ -723,13 +718,6 @@ jobs: } EOF - # - name: configure aws credentials using assumed role - # uses: aws-actions/configure-aws-credentials@v1.7.0 - # with: - # role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/radius_func_test #TODO: change to reflect ARN of the role to assume craeted in functional test account - # role-session-name: GitHub_to_AWS_via_FederatedOIDC - # aws-region: ${{ env.AWS_REGION }} - - name: Run functional tests run: | # Ensure rad cli is in path before running tests. diff --git a/test/validation/aws.go b/test/validation/aws.go index dea5e7856b..805ace9e4b 100644 --- a/test/validation/aws.go +++ b/test/validation/aws.go @@ -161,7 +161,6 @@ func GetResourceIdentifier(ctx context.Context, resourceType string, name string if region == "" || accountID == "" { return "", fmt.Errorf("AWS_REGION or AWS_ACCOUNT_ID is not set") } - //return "/planes/aws/aws/accounts/" + "179022619019" + "/regions/" + region + "/providers/" + resourceType + "/" + name, nil return "/planes/aws/aws/accounts/" + accountID + "/regions/" + region + "/providers/" + resourceType + "/" + name, nil }