1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-15 17:51:01 +00:00

Adding environment variables for e2e tests and fixed incorrectly used arguments in 2 functions

This commit is contained in:
Kian 2021-09-07 11:20:09 +01:00
parent fcaa38b36f
commit af4c10bd0c
2 changed files with 8 additions and 3 deletions

View file

@ -60,5 +60,10 @@ kubectl run --rm \
--env="VAULT_URL=${VAULT_URL:-}" \
--env="GITLAB_TOKEN=${GITLAB_TOKEN:-}" \
--env="GITLAB_PROJECT_ID=${GITLAB_PROJECT_ID:-}" \
--env="ORACLE_USER_OCID=${ORACLE_USER_OCID:-}" \
--env="ORACLE_TENANCY_OCID${ORACLE_TENANCY_OCID:-}" \
--env="ORACLE_REGION${ORACLE_REGION:-}" \
--env="ORACLE_FINGERPRINT${ORACLE_FINGERPRINT:-}" \
--env="ORACLE_KEY${ORACLE_KEY:-}" \
--overrides='{ "apiVersion": "v1", "spec":{"serviceAccountName": "external-secrets-e2e"}}' \
e2e --image=local/external-secrets-e2e:test

View file

@ -65,8 +65,8 @@ func (p *oracleProvider) CreateSecret(key, val string) {
vmssecretrequest := vault.CreateSecretRequest{}
vmssecretrequest.SecretName = utilpointer.StringPtr(secretName)
vmssecretrequest.SecretContent = vault.Base64SecretContentDetails{
Name: utilpointer.StringPtr("secretName"),
Content: utilpointer.StringPtr("secretContent"),
Name: utilpointer.StringPtr(key),
Content: utilpointer.StringPtr(val),
}
_, err = client.CreateSecret(p.ctx, vmssecretrequest)
Expect(err).ToNot(HaveOccurred())
@ -77,7 +77,7 @@ func (p *oracleProvider) DeleteSecret(key string) {
client, err := vault.NewVaultsClientWithConfigurationProvider(configurationProvider)
Expect(err).ToNot(HaveOccurred())
vmssecretrequest := vault.ScheduleSecretDeletionRequest{}
vmssecretrequest.SecretId = utilpointer.StringPtr(secretName)
vmssecretrequest.SecretId = utilpointer.StringPtr(key)
_, err = client.ScheduleSecretDeletion(p.ctx, vmssecretrequest)
Expect(err).ToNot(HaveOccurred())
}