Add upload token config validation
This commit is contained in:
@@ -70,14 +70,24 @@ func writeServeUploadConfig(t *testing.T, tokenEnvs []string) string {
|
||||
server:
|
||||
http:
|
||||
bind: 127.0.0.1:0
|
||||
pipelines:
|
||||
upload_tokens:
|
||||
`
|
||||
for index, tokenEnv := range tokenEnvs {
|
||||
body += `
|
||||
- id: reporter-` + string(rune('a'+index)) + `
|
||||
token_env: ` + tokenEnv + `
|
||||
allow_pipelines:
|
||||
- reports-` + string(rune('a'+index)) + `
|
||||
`
|
||||
}
|
||||
body += `
|
||||
pipelines:
|
||||
`
|
||||
for index := range tokenEnvs {
|
||||
body += `
|
||||
- id: reports-` + string(rune('a'+index)) + `
|
||||
source:
|
||||
backend: http_upload
|
||||
token_env: ` + tokenEnv + `
|
||||
destinations:
|
||||
- id: archive
|
||||
backend: local
|
||||
|
||||
Reference in New Issue
Block a user