Skip to content

Commit b127557

Browse files
author
Yury Rashetska
committed
Fix test flags initialization order
1 parent e6378a8 commit b127557

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

responses_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
package twilio
22

33
import (
4-
"flag"
54
"net/http"
65
"net/http/httptest"
76
"net/url"
87
"os"
98
"sync"
10-
"testing"
119
)
1210

1311
// the envClient is configured to use an Account Sid and Auth Token set in the
1412
// environment. all non-short tests should use the envClient
1513
var envClient *Client
1614

1715
func init() {
18-
flag.Parse()
19-
if !testing.Short() && os.Getenv("TWILIO_ACCOUNT_SID") == "" {
16+
if os.Getenv("TWILIO_ACCOUNT_SID") == "" {
2017
os.Stderr.WriteString("warning: no TWILIO_ACCOUNT_SID configured, HTTP tests will probably fail...\n\n")
2118
}
2219
envClient = NewClient(os.Getenv("TWILIO_ACCOUNT_SID"), os.Getenv("TWILIO_AUTH_TOKEN"), nil)

0 commit comments

Comments
 (0)