mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-10-30 10:57:15 +08:00
refactor: Use koanf.Koanf in e2e tests to pass agent configuration instead of CLI arguments
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/knadh/koanf/parsers/yaml"
|
||||
"github.com/knadh/koanf/providers/rawbytes"
|
||||
"github.com/knadh/koanf/v2"
|
||||
)
|
||||
|
||||
@@ -44,7 +45,7 @@ func (s *Source) Load() error {
|
||||
func load(p koanf.Provider) (*koanf.Koanf, []string, error) {
|
||||
var q koanf.Parser
|
||||
switch p.(type) {
|
||||
case *RemoteFileProvider, *LocalFileProvider:
|
||||
case *RemoteFileProvider, *LocalFileProvider, *rawbytes.RawBytes:
|
||||
q = yaml.Parser()
|
||||
default:
|
||||
q = nil
|
||||
|
||||
Reference in New Issue
Block a user