-
Notifications
You must be signed in to change notification settings - Fork 3
/
dialect_test.go
91 lines (90 loc) · 2.75 KB
/
dialect_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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package asc_test
//Refactoring ...
//
//import (
// "github.com/stretchr/testify/assert"
// _ "github.com/viant/asc"
// "github.com/viant/dsc"
// "github.com/viant/dsunit"
// "testing"
//)
//
//func TestDialectGetDatastores(t *testing.T) {
// factory := dsc.NewManagerFactory()
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// dialect := dsc.GetDatastoreDialect("aerospike")
//
// names, err := dialect.GetDatastores(manager)
// assert.Nil(t, err)
// assert.Equal(t, 1, len(names))
// }
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store2.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// dialect := dsc.GetDatastoreDialect("aerospike")
// _, err = dialect.GetDatastores(manager)
// assert.NotNil(t, err)
// }
//}
//
//func TestDialectGetDatastore(t *testing.T) {
// factory := dsc.NewManagerFactory()
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// dialect := dsc.GetDatastoreDialect("aerospike")
// name, err := dialect.GetCurrentDatastore(manager)
// assert.Nil(t, err)
// assert.Equal(t, "test", name)
//}
//
//func TestDialectGetTables(t *testing.T) {
// factory := dsc.NewManagerFactory()
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store1.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
//
// assert.NotNil(t, manager)
//
// dialect := dsc.GetDatastoreDialect("aerospike")
// _, err = dialect.GetTables(manager, "test")
// assert.Nil(t, err)
// }
//
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store2.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// dialect := dsc.GetDatastoreDialect("aerospike")
// _, err = dialect.GetTables(manager, "test")
// assert.NotNil(t, err)
// }
//}
//
//func TestDropTable(t *testing.T) {
//
// factory := dsc.NewManagerFactory()
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store3.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// assert.NotNil(t, manager)
// dialect := dsc.GetDatastoreDialect("aerospike")
// err = dialect.DropTable(manager, "test10", "abc")
// assert.Nil(t, err)
// }
// {
// configUrl := dsunit.ExpandTestProtocolAsURLIfNeeded("test://test/config/store3.json")
// manager, err := factory.CreateFromURL(configUrl)
// assert.Nil(t, err)
// assert.NotNil(t, manager)
// dialect := dsc.GetDatastoreDialect("aerospike")
// err = dialect.DropTable(manager, "test10 abc", "abc")
// assert.Nil(t, err)
// }
//}