-
Notifications
You must be signed in to change notification settings - Fork 10
/
client_test.go
42 lines (35 loc) · 955 Bytes
/
client_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
// Copyright 2014 The GiterLab Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// test client for ots2
package goots
import (
. "github.com/GiterLab/goots/otstype"
"testing"
)
func Test_New(t *testing.T) {
o, err := New("http://127.0.0.1:8800", "OTSMultiUser177_accessid", "OTSMultiUser177_accesskey", "TestInstance177")
if err != nil {
t.Fail()
}
t.Log(o)
o, err = New("http://127.0.0.1:8800", "OTSMultiUser177_accessid", "OTSMultiUser177_accesskey", "TestInstance177",
60, 60, "ots2-client-test", "utf-8")
if err != nil {
t.Fail()
}
t.Log(o)
// t.Fail()
}
func Test_Set(t *testing.T) {
o, err := New("http://127.0.0.1:8800", "OTSMultiUser177_accessid", "OTSMultiUser177_accesskey", "TestInstance177")
if err != nil {
t.Fail()
}
t.Log(o)
o = o.Set(DictString{
"EndPoint": "http://127.0.0.1:8888",
// "NotExist": 123,
})
t.Log(o)
}