Skip to content

Commit 75e97f0

Browse files
committed
Swapping getSecret priority
- Swaps priority of getSecrets function to match getEnv, so that pipeline always takes precedence - Updates tests to ensure they run Fixes: #112
1 parent c272c3f commit 75e97f0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

s3secrets-helper/secrets/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ func getSecrets(conf Config, results chan<- getResult) {
146146
}...)
147147

148148
prefixes := []string{
149-
conf.Prefix + "/secret-files",
150149
"secret-files",
150+
conf.Prefix + "/secret-files",
151151
}
152152

153153
conf.Logger.Printf("Checking S3 for secret-files")

s3secrets-helper/secrets/secrets_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ func TestRun(t *testing.T) {
160160
// because git-credentials were found:
161161
// (wrap in double quotes so that bash eval doesn't consume the inner single quote.
162162
`GIT_CONFIG_PARAMETERS="` + gitCredentialHelpers + `"`,
163+
"ORG_SERVICE_TOKEN='org service token'",
163164
"BUILDKITE_ACCESS_KEY='buildkite access key'",
164165
"DATABASE_SECRET='database secret'",
165166
"EXTERNAL_API_SECRET_KEY='external api secret'",
166167
"PRIVILEGED_PASSWORD='privileged password'",
167168
"SERVICE_TOKEN='service token'",
168-
"ORG_SERVICE_TOKEN='org service token'",
169169
}, "\n") + "\n"
170170

171171
if actual := envSink.String(); expected != actual {

tests/environment.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bats
22

3-
load '/usr/local/lib/bats/load.bash'
3+
load '/usr/lib/bats/load.bash'
44

55
# export AWS_STUB_DEBUG=/dev/tty
66
# export SSH_ADD_STUB_DEBUG=/dev/tty

0 commit comments

Comments
 (0)