We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a05989 commit 090970fCopy full SHA for 090970f
responses_test.go
@@ -10,7 +10,14 @@ import (
10
11
// the envClient is configured to use an Account Sid and Auth Token set in the
12
// environment. all non-short tests should use the envClient
13
-var envClient = NewClient(os.Getenv("TWILIO_ACCOUNT_SID"), os.Getenv("TWILIO_AUTH_TOKEN"), nil)
+var envClient *Client
14
+
15
+func init() {
16
+ if os.Getenv("TWILIO_ACCOUNT_SID") == "" {
17
+ os.Stderr.WriteString("warning: no TWILIO_ACCOUNT_SID configured, HTTP tests will probably fail...\n\n")
18
+ }
19
+ envClient = NewClient(os.Getenv("TWILIO_ACCOUNT_SID"), os.Getenv("TWILIO_AUTH_TOKEN"), nil)
20
+}
21
22
type Server struct {
23
s *httptest.Server
0 commit comments