(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestRuntimeConfigOptions_AddFlags(t *testing.T) { |
| 48 | fs := pflag.NewFlagSet("test", pflag.ContinueOnError) |
| 49 | disOpt := NewRuntimeConfigOptions() |
| 50 | disOpt.AddFlags(fs) |
| 51 | args := []string{ |
| 52 | "--runtime-alive-timeout=10", |
| 53 | } |
| 54 | fs.Parse(args) |
| 55 | expected := &RuntimeConfigOptions{ |
| 56 | WaitRuntimeAliveTimeout: 10, |
| 57 | } |
| 58 | if !reflect.DeepEqual(expected, disOpt) { |
| 59 | t.Errorf("Got different run options than expected.") |
| 60 | } |
| 61 | } |
nothing calls this directly
no test coverage detected