github.com/wawandco/oxpecker-plugins@v0.1.1/tools/standard/test_test.go (about) 1 package standard 2 3 import ( 4 "context" 5 "os" 6 "testing" 7 ) 8 9 func Test_RunBeforeTest(t *testing.T) { 10 p := &Plugin{} 11 ctx := context.Background() 12 err := p.RunBeforeTest(ctx, "", []string{}) 13 14 if err != nil { 15 t.Errorf("Should not error, got %v", err) 16 } 17 18 env := os.Getenv("GO_ENV") 19 if env != "test" { 20 t.Errorf("GO_ENV should is %v should be %v", env, "test") 21 } 22 }