diff --git a/examples/commander.yaml b/examples/commander.yaml index 8228e642..fded1a3a 100644 --- a/examples/commander.yaml +++ b/examples/commander.yaml @@ -23,4 +23,4 @@ tests: it should skip: command: echo hello - disable: true \ No newline at end of file + skip: true \ No newline at end of file diff --git a/pkg/runtime/runner.go b/pkg/runtime/runner.go index 3b329111..b639314f 100644 --- a/pkg/runtime/runner.go +++ b/pkg/runtime/runner.go @@ -32,7 +32,7 @@ func (r *Runner) Run(tests []TestCase) <-chan TestResult { for t := range tests { // If test is disabled skip it - if t.Disable { + if t.Skip { tr := TestResult{TestCase: t, Skipped: true} out <- tr continue diff --git a/pkg/runtime/runtime.go b/pkg/runtime/runtime.go index cbdf0481..7c870e40 100644 --- a/pkg/runtime/runtime.go +++ b/pkg/runtime/runtime.go @@ -53,7 +53,7 @@ type TestCase struct { Result CommandResult Nodes []string FileName string - Disable bool + Skip bool } //GlobalTestConfig represents the configuration for a test diff --git a/pkg/runtime/runtime_test.go b/pkg/runtime/runtime_test.go index e5830ed2..ef25bb67 100644 --- a/pkg/runtime/runtime_test.go +++ b/pkg/runtime/runtime_test.go @@ -71,7 +71,7 @@ func Test_RuntimeWithRetriesAndInterval(t *testing.T) { func Test_RuntimeWithSkip(t *testing.T) { s := getExampleTestCases() - s[0].Disable = true + s[0].Skip = true r := getRuntime() got := r.Start(s) diff --git a/pkg/suite/yaml_suite.go b/pkg/suite/yaml_suite.go index 12040210..720f4bee 100644 --- a/pkg/suite/yaml_suite.go +++ b/pkg/suite/yaml_suite.go @@ -47,7 +47,7 @@ type YAMLTest struct { Stdout interface{} `yaml:"stdout,omitempty"` Stderr interface{} `yaml:"stderr,omitempty"` Config YAMLTestConfigConf `yaml:"config,omitempty"` - Disable bool `yaml:"disable,omitempty"` + Skip bool `yaml:"skip,omitempty"` } // ParseYAML parses the Suite from a yaml byte slice @@ -119,7 +119,7 @@ func convertYAMLSuiteConfToTestCases(conf YAMLSuiteConf, fileName string) []runt }, Nodes: t.Config.Nodes, FileName: fileName, - Disable: t.Disable, + Skip: t.Skip, }) } @@ -154,7 +154,7 @@ func (y *YAMLSuiteConf) UnmarshalYAML(unmarshal func(interface{}) error) error { Stdout: y.convertToExpectedOut(v.Stdout), Stderr: y.convertToExpectedOut(v.Stderr), Config: y.mergeConfigs(v.Config, params.Config), - Disable: v.Disable, + Skip: v.Skip, } // Set key as command, if command property was empty diff --git a/pkg/suite/yaml_suite_test.go b/pkg/suite/yaml_suite_test.go index 9cbfa592..10bf0faf 100644 --- a/pkg/suite/yaml_suite_test.go +++ b/pkg/suite/yaml_suite_test.go @@ -82,7 +82,7 @@ tests: exit-code: 0 stdout: hello stderr: anything - disable: true + skip: true `) got := ParseYAML(yaml, "") tests := got.GetTests() @@ -93,7 +93,7 @@ tests: assert.Equal(t, "it should print hello", tests[0].Title) assert.Equal(t, "hello", tests[0].Expected.Stdout.Contains[0]) assert.Equal(t, "anything", tests[0].Expected.Stderr.Contains[0]) - assert.True(t, tests[0].Disable) + assert.True(t, tests[0].Skip) } func TestYAMLConfig_UnmarshalYAML_ShouldConvertStdoutToExpectedOut(t *testing.T) {