Missing path to config file in viper during initialization of controller
Description
During the loading process of the config file, there are processes to also write changes at this specific time (see viper.WriteConfig()
for example). Viper doesn't know the file path to the config file (at least) at this time. In the past this led to an error to be thrown which wasn't handled and therefore this behaviour hasn't been noticed before. Catching the error led to failed test cases.
Expected Behavior
New changes get written directly into the config file by viper.
Actual Behavior
Viper has no set file path, therefore an error is thrown and changes do not get written into the file.
Possible Fix
Set path to file in viper somewhere else in the code. (Not sure where exactly)
Steps to Reproduce
- Catch error thrown by
viper.WriteConfig()
- TestRun() in controller_test fails.