We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dace5c commit 2dc8c61Copy full SHA for 2dc8c61
pkg/test/examples_test.go
@@ -17,6 +17,8 @@ const (
17
)
18
19
func TestExamples(t *testing.T) {
20
+ RequireOpenAPIKey(t)
21
+
22
tests := []string{
23
"fib.gpt",
24
"helloworld.gpt",
@@ -38,6 +40,8 @@ func TestExamples(t *testing.T) {
38
40
}
39
41
42
func TestEcho(t *testing.T) {
43
44
45
r, err := runner.New()
46
require.NoError(t, err)
47
@@ -49,3 +53,9 @@ func TestEcho(t *testing.T) {
49
53
50
54
autogold.ExpectFile(t, output)
51
55
56
57
+func RequireOpenAPIKey(t *testing.T) {
58
+ if os.Getenv("OPENAI_API_KEY") == "" {
59
+ t.Skip()
60
+ }
61
+}
0 commit comments