-
Notifications
You must be signed in to change notification settings - Fork 16
/
schema_test.go
49 lines (42 loc) · 1.09 KB
/
schema_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package memphis
import (
"fmt"
"testing"
)
func TestCreateSchema(t *testing.T) {
c, err := Connect("localhost", "root", Password("memphis"))
if err != nil {
fmt.Println(err.Error())
}
defer c.Close()
err = c.CreateSchema("sdk_test_schema_graphql", "graphql", "./test_schemas/test.graphqls")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println("qraphql Created!!")
}
err = c.CreateSchema("sdk_test_schema_protobuf2", "protobuf", "./test_schemas/test_p2.proto")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println("protobuf Created!!")
}
err = c.CreateSchema("sdk_test_schema_protobuf3", "protobuf", "./test_schemas/test_p3.proto")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println("protobuf Created!!")
}
err = c.CreateSchema("sdk_test_schema_json", "json", "./test_schemas/test.json")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println("json Created!!")
}
err = c.CreateSchema("sdk_test_schema_avro", "avro", "./test_schemas/test.avsc")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println("avro Created!!")
}
}