File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ import (
1212)
1313
1414func TestOptimizer (t * testing.T ) {
15- args := []string {
16- "--verbose" ,
17- }
1815 files , err := filepath .Glob ("../tests/probe-*.yml" )
1916 assert .Nil (t , err )
2017 assert .GreaterOrEqual (t , 1 , len (files ))
@@ -27,20 +24,18 @@ func TestOptimizer(t *testing.T) {
2724 }
2825 }
2926
30- // Run pathvector to generate config first, so there is a config to modify
31- rootCmd .SetArgs (append (args , []string {
32- "generate" ,
27+ baseArgs := []string {
28+ "--verbose" ,
3329 "--config" , testFile ,
34- }... ))
35- t .Logf ("Running pre-optimizer generate: %v" , args )
30+ }
31+
32+ // Run pathvector to generate config first, so there is a config to modify
33+ rootCmd .SetArgs (append (baseArgs , "generate" ))
34+ t .Log ("Running pre-optimizer generate" )
3635 assert .Nil (t , rootCmd .Execute ())
3736
38- args = append (args , []string {
39- "optimizer" ,
40- "--config" , testFile ,
41- }... )
42- t .Logf ("running probe integration with args %v" , args )
43- rootCmd .SetArgs (args )
37+ rootCmd .SetArgs (append (baseArgs , "optimizer" ))
38+ t .Log ("Running probe integration" )
4439 assert .Nil (t , rootCmd .Execute ())
4540
4641 // Check if local pref is lowered
You can’t perform that action at this time.
0 commit comments