fix: check temp file with env vars expanded instead of original config file to avoid validation failures

This commit is contained in:
iwilltry42 2021-10-21 21:28:31 +02:00
parent 6abb1fb20c
commit a4d573fc2c
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110
2 changed files with 5 additions and 1 deletions

View File

@ -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)
}

View File

@ -0,0 +1,4 @@
apiVersion: k3d.io/v1alpha3
kind: Simple
name: testenvexpand
servers: ${K3D_TEST_SERVERS}