mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
update gofumpt to 0.3.1 and reformat the repo (#17055)
* update gofumpt to 0.3.1 and reformat the repo * output the version of the formatter we're using
This commit is contained in:
@@ -1021,31 +1021,33 @@ func TestBackend_PathBlacklistRoleTag(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
/* This is an acceptance test.
|
||||
Requires the following env vars:
|
||||
TEST_AWS_EC2_RSA2048
|
||||
TEST_AWS_EC2_PKCS7
|
||||
TEST_AWS_EC2_IDENTITY_DOCUMENT
|
||||
TEST_AWS_EC2_IDENTITY_DOCUMENT_SIG
|
||||
TEST_AWS_EC2_AMI_ID
|
||||
TEST_AWS_EC2_ACCOUNT_ID
|
||||
TEST_AWS_EC2_IAM_ROLE_ARN
|
||||
/*
|
||||
This is an acceptance test.
|
||||
|
||||
If this is being run on an EC2 instance, you can set the environment vars using this bash snippet:
|
||||
Requires the following env vars:
|
||||
TEST_AWS_EC2_RSA2048
|
||||
TEST_AWS_EC2_PKCS7
|
||||
TEST_AWS_EC2_IDENTITY_DOCUMENT
|
||||
TEST_AWS_EC2_IDENTITY_DOCUMENT_SIG
|
||||
TEST_AWS_EC2_AMI_ID
|
||||
TEST_AWS_EC2_ACCOUNT_ID
|
||||
TEST_AWS_EC2_IAM_ROLE_ARN
|
||||
|
||||
export TEST_AWS_EC2_RSA2048=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/rsa2048)
|
||||
export TEST_AWS_EC2_PKCS7=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/pkcs7)
|
||||
export TEST_AWS_EC2_IDENTITY_DOCUMENT=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | base64 -w 0)
|
||||
export TEST_AWS_EC2_IDENTITY_DOCUMENT_SIG=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/signature | tr -d '\n')
|
||||
export TEST_AWS_EC2_AMI_ID=$(curl -s http://169.254.169.254/latest/meta-data/ami-id)
|
||||
export TEST_AWS_EC2_IAM_ROLE_ARN=$(aws iam get-role --role-name $(curl -q http://169.254.169.254/latest/meta-data/iam/security-credentials/ -S -s) --query Role.Arn --output text)
|
||||
export TEST_AWS_EC2_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
||||
If this is being run on an EC2 instance, you can set the environment vars using this bash snippet:
|
||||
|
||||
If the test is not being run on an EC2 instance that has access to
|
||||
credentials using EC2RoleProvider, on top of the above vars, following
|
||||
needs to be set:
|
||||
TEST_AWS_SECRET_KEY
|
||||
TEST_AWS_ACCESS_KEY
|
||||
export TEST_AWS_EC2_RSA2048=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/rsa2048)
|
||||
export TEST_AWS_EC2_PKCS7=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/pkcs7)
|
||||
export TEST_AWS_EC2_IDENTITY_DOCUMENT=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | base64 -w 0)
|
||||
export TEST_AWS_EC2_IDENTITY_DOCUMENT_SIG=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/signature | tr -d '\n')
|
||||
export TEST_AWS_EC2_AMI_ID=$(curl -s http://169.254.169.254/latest/meta-data/ami-id)
|
||||
export TEST_AWS_EC2_IAM_ROLE_ARN=$(aws iam get-role --role-name $(curl -q http://169.254.169.254/latest/meta-data/iam/security-credentials/ -S -s) --query Role.Arn --output text)
|
||||
export TEST_AWS_EC2_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
||||
|
||||
If the test is not being run on an EC2 instance that has access to
|
||||
credentials using EC2RoleProvider, on top of the above vars, following
|
||||
needs to be set:
|
||||
TEST_AWS_SECRET_KEY
|
||||
TEST_AWS_ACCESS_KEY
|
||||
*/
|
||||
func TestBackendAcc_LoginWithInstanceIdentityDocAndAccessListIdentity(t *testing.T) {
|
||||
for _, path := range []string{"identity-whitelist/", "identity-accesslist/"} {
|
||||
|
||||
Reference in New Issue
Block a user