diff --git a/doc/tutorial/kubernetes/tut_test.go b/doc/tutorial/kubernetes/tut_test.go index 3d45482ab..25b455ebf 100644 --- a/doc/tutorial/kubernetes/tut_test.go +++ b/doc/tutorial/kubernetes/tut_test.go @@ -40,10 +40,12 @@ import ( var ( cleanup = flag.Bool("cleanup", true, "clean up generated files") + + testLong = os.Getenv("CUE_LONG") != "" ) func TestTutorial(t *testing.T) { - if !cuetest.Long { + if !testLong { t.Skipf("the kubernetes tutorial can easily take half a minute") } @@ -272,7 +274,7 @@ func isCUE(filename string) bool { } func TestEval(t *testing.T) { - if !cuetest.Long { + if !testLong { t.Skipf("the kubernetes tutorial can easily take half a minute") } diff --git a/internal/cuetest/cuetest.go b/internal/cuetest/cuetest.go index 52242aa63..4b2bb49a5 100644 --- a/internal/cuetest/cuetest.go +++ b/internal/cuetest/cuetest.go @@ -26,8 +26,6 @@ import ( ) const ( - envLong = "CUE_LONG" - envUpdate = "CUE_UPDATE" // envNonIssues can be set to a regular expression which indicates what @@ -54,11 +52,6 @@ var ( } ) -// Long determines whether long tests should be run. -// It is controlled by setting CUE_LONG to a non-empty string like "true". -// Note that it is not the equivalent of not supplying -short. -var Long = os.Getenv(envLong) != "" - // UpdateGoldenFiles determines whether testscript scripts should update txtar // archives in the event of cmp failures. // It is controlled by setting CUE_UPDATE to a non-empty string like "true". @@ -73,8 +66,6 @@ var FormatTxtar = os.Getenv(envFormatTxtar) != "" // Condition adds support for CUE-specific testscript conditions within // testscript scripts. Supported conditions include: // -// [long] - evaluates to true when the long build tag is specified -// // [golang.org/issue/N] - evaluates to true unless CUE_NON_ISSUES // is set to a regexp that matches the condition, i.e. golang.org/issue/N // in this case @@ -90,10 +81,6 @@ func Condition(cond string) (bool, error) { if isIssue { return !nonIssue, nil } - switch cond { - case "long": - return Long, nil - } return false, fmt.Errorf("unknown condition %v", cond) } diff --git a/internal/cuetest/cuetest_test.go b/internal/cuetest/cuetest_test.go index e0fc4a220..bb217d290 100644 --- a/internal/cuetest/cuetest_test.go +++ b/internal/cuetest/cuetest_test.go @@ -13,11 +13,6 @@ func TestCondition(t *testing.T) { err string }{ // issue cases covered by TestCheckIssueCondition - { - name: "long", - con: "long", - want: Long, // not really testing much here - }, { name: "bad condition", env: ".",