From 565c4d53da10d29bd237cf7cf5004180004cb984 Mon Sep 17 00:00:00 2001 From: Gabriel Corado Date: Mon, 2 Sep 2024 10:33:36 -0300 Subject: [PATCH] test(config): add a test case with config file and command line arg --- lib/config/configuration_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/config/configuration_test.go b/lib/config/configuration_test.go index 75b4f145f0d0c..fd2b4e3b83fd5 100644 --- a/lib/config/configuration_test.go +++ b/lib/config/configuration_test.go @@ -5023,6 +5023,14 @@ debug_service: `, expectDebugServiceEnabled: false, }, + "commandline flag has priority over config file": { + configFile: ` +debug_service: + enabled: "yes" +`, + commandLineFlags: &CommandLineFlags{DisabledDebugService: true}, + expectDebugServiceEnabled: false, + }, } { t.Run(name, func(t *testing.T) { filePath := filepath.Join(t.TempDir(), "config.yaml")