fix: check temp file with env vars expanded instead of original config file to avoid validation failures
This commit is contained in:
parent
6abb1fb20c
commit
a4d573fc2c
@ -84,7 +84,7 @@ func InitViperWithConfigFile(cfgViper *viper.Viper, configFile string) error {
|
||||
l.Log().Fatalf("Cannot validate config file %s: %+v", configFile, err)
|
||||
}
|
||||
|
||||
if err := config.ValidateSchemaFile(configFile, schema); err != nil {
|
||||
if err := config.ValidateSchemaFile(tmpfile.Name(), schema); err != nil {
|
||||
l.Log().Fatalf("Schema Validation failed for config file %s: %+v", configFile, err)
|
||||
}
|
||||
|
||||
|
4
tests/assets/config_env.yaml
Normal file
4
tests/assets/config_env.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: k3d.io/v1alpha3
|
||||
kind: Simple
|
||||
name: testenvexpand
|
||||
servers: ${K3D_TEST_SERVERS}
|
Loading…
Reference in New Issue
Block a user