mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-22 04:32:02 +02:00
introduce mapstructure decoder for yaml parsing
remove color output in tests for better readability in github actions bugfix: remove google as default provider for alpha options fix conversion flow for toml to yaml revert ginkgo color deactivation revert claim- and secret source back to pointers regenerate alpha config Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
func GetSecretValue(source *options.SecretSource) ([]byte, error) {
|
||||
switch {
|
||||
case len(source.Value) > 0 && source.FromEnv == "" && source.FromFile == "":
|
||||
return source.Value, nil
|
||||
return []byte(source.Value), nil
|
||||
case len(source.Value) == 0 && source.FromEnv != "" && source.FromFile == "":
|
||||
return []byte(os.Getenv(source.FromEnv)), nil
|
||||
case len(source.Value) == 0 && source.FromEnv == "" && source.FromFile != "":
|
||||
|
||||
@@ -31,7 +31,7 @@ var _ = Describe("GetSecretValue", func() {
|
||||
|
||||
It("returns the correct value from the string value", func() {
|
||||
value, err := GetSecretValue(&options.SecretSource{
|
||||
Value: []byte("secret-value-1"),
|
||||
Value: "secret-value-1",
|
||||
})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(string(value)).To(Equal("secret-value-1"))
|
||||
|
||||
Reference in New Issue
Block a user