File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,14 @@ import (
33
33
)
34
34
35
35
func TestBuildSchema (t * testing.T ) {
36
- stack , err := node .New (& node .DefaultConfig )
36
+ ddir , err := ioutil .TempDir ("" , "graphql-buildschema" )
37
+ if err != nil {
38
+ t .Fatalf ("failed to create temporary datadir: %v" , err )
39
+ }
40
+ // Copy config
41
+ conf := node .DefaultConfig
42
+ conf .DataDir = ddir
43
+ stack , err := node .New (& conf )
37
44
if err != nil {
38
45
t .Fatalf ("could not create new node: %v" , err )
39
46
}
@@ -157,6 +164,7 @@ func TestGraphQLHTTPOnSamePort_GQLRequest_Unsuccessful(t *testing.T) {
157
164
if err != nil {
158
165
t .Fatalf ("could not read from response body: %v" , err )
159
166
}
167
+ resp .Body .Close ()
160
168
// make sure the request is not handled successfully
161
169
if want , have := "404 page not found\n " , string (bodyBytes ); have != want {
162
170
t .Errorf ("have:\n %v\n want:\n %v" , have , want )
You can’t perform that action at this time.
0 commit comments