Migrate Notarius to credential lists
This commit is contained in:
@@ -102,7 +102,7 @@ storage:
|
||||
secret_access_key: NARRATIO_TEST_SECRET_KEY
|
||||
notarius:
|
||||
enabled: false
|
||||
llm_api_key: NARRATIO_TEST_NOTARIUS_KEY
|
||||
credentials: [NARRATIO_TEST_NOTARIUS_KEY]
|
||||
config_profile: ""
|
||||
`
|
||||
pipelinePath, _ := writeConfigFiles(t, pipelineYAML, testSessionBaseYAML)
|
||||
@@ -146,8 +146,8 @@ notarius:
|
||||
}
|
||||
var roundTrip struct {
|
||||
Notarius *struct {
|
||||
LLMAPIKey *string `yaml:"llm_api_key"`
|
||||
ConfigProfile *string `yaml:"config_profile"`
|
||||
Credentials []string `yaml:"credentials"`
|
||||
ConfigProfile *string `yaml:"config_profile"`
|
||||
} `yaml:"notarius"`
|
||||
}
|
||||
if err := yaml.Unmarshal(firstYAML, &roundTrip); err != nil {
|
||||
@@ -156,8 +156,8 @@ notarius:
|
||||
if roundTrip.Notarius == nil || roundTrip.Notarius.ConfigProfile == nil || *roundTrip.Notarius.ConfigProfile != "" {
|
||||
t.Fatalf("round-trip config profile = %#v, want explicit empty", roundTrip.Notarius)
|
||||
}
|
||||
if roundTrip.Notarius.LLMAPIKey == nil || *roundTrip.Notarius.LLMAPIKey != "NARRATIO_TEST_NOTARIUS_KEY" {
|
||||
t.Fatalf("round-trip credential reference = %#v, want safe public name", roundTrip.Notarius.LLMAPIKey)
|
||||
if len(roundTrip.Notarius.Credentials) != 1 || roundTrip.Notarius.Credentials[0] != "NARRATIO_TEST_NOTARIUS_KEY" {
|
||||
t.Fatalf("round-trip credential reference = %#v, want safe public name", roundTrip.Notarius.Credentials)
|
||||
}
|
||||
|
||||
t.Setenv("NARRATIO_TEST_ACCESS_KEY", secondCanary)
|
||||
|
||||
Reference in New Issue
Block a user