MCPcopy Create free account
hub / github.com/go-task/task / TestDisplaysErrorOnVersion2Schema

Function TestDisplaysErrorOnVersion2Schema

task_test.go:1946–1959  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1944}
1945
1946func TestDisplaysErrorOnVersion2Schema(t *testing.T) {
1947 t.Parallel()
1948
1949 var buff bytes.Buffer
1950 e := task.NewExecutor(
1951 task.WithDir("testdata/version/v2"),
1952 task.WithStdout(io.Discard),
1953 task.WithStderr(&buff),
1954 task.WithVersionCheck(true),
1955 )
1956 err := e.Setup()
1957 require.Error(t, err)
1958 assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v2\/Taskfile\.yml\":\nSchema version \(2\.0\.0\) no longer supported\. Please use v3 or above`), err.Error())
1959}
1960
1961func TestShortTaskNotation(t *testing.T) {
1962 t.Parallel()

Callers

nothing calls this directly

Calls 2

SetupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…