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

Function TestDisplaysErrorOnVersion1Schema

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

Source from the content-addressed store, hash-verified

1930}
1931
1932func TestDisplaysErrorOnVersion1Schema(t *testing.T) {
1933 t.Parallel()
1934
1935 e := task.NewExecutor(
1936 task.WithDir("testdata/version/v1"),
1937 task.WithStdout(io.Discard),
1938 task.WithStderr(io.Discard),
1939 task.WithVersionCheck(true),
1940 )
1941 err := e.Setup()
1942 require.Error(t, err)
1943 assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v1\/Taskfile\.yml\":\nSchema version \(1\.0\.0\) no longer supported\. Please use v3 or above`), err.Error())
1944}
1945
1946func TestDisplaysErrorOnVersion2Schema(t *testing.T) {
1947 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…