重新初始化仓库
This commit is contained in:
68
client/curl_test.go
Normal file
68
client/curl_test.go
Normal file
@ -0,0 +1,68 @@
|
||||
// Package client ...
|
||||
//
|
||||
// Description : client ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-11-30 2:04 下午
|
||||
package client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func init() {
|
||||
_ = NewClient(&Config{
|
||||
Domain: "http://localhost:10998",
|
||||
Namespace: "test",
|
||||
AppID: "test",
|
||||
LocalCacheEnable: false,
|
||||
})
|
||||
}
|
||||
|
||||
// TestCenterClient_CreateNamespace ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2:04 下午 2021/11/30
|
||||
func TestCenterClient_CreateNamespace(t *testing.T) {
|
||||
fmt.Println(CenterConfig.CreateNamespace(nil, "test", "123456", "测试", "测试专用命名空间"))
|
||||
}
|
||||
|
||||
// TestCenterClient_ActiveNamespace ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2:10 下午 2021/11/30
|
||||
func TestCenterClient_ActiveNamespace(t *testing.T) {
|
||||
fmt.Println(CenterConfig.ActiveNamespace(nil, "test", "123456"))
|
||||
}
|
||||
|
||||
// TestCenterClient_CreateConfig ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 3:08 下午 2021/11/30
|
||||
func TestCenterClient_CreateConfig(t *testing.T) {
|
||||
fmt.Println(CenterConfig.CreateConfig(nil, "name", "zhangdeman", "123456", "测试key"))
|
||||
}
|
||||
|
||||
// TestCenterClient_GetConfig ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 3:11 下午 2021/11/30
|
||||
func TestCenterClient_GetConfig(t *testing.T) {
|
||||
r, e := CenterConfig.GetConfig(nil, "name", nil)
|
||||
fmt.Println(string(r), e)
|
||||
}
|
||||
|
||||
// TestCenterClient_UpdateConfig ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 3:38 下午 2021/11/30
|
||||
func TestCenterClient_UpdateConfig(t *testing.T) {
|
||||
fmt.Println(CenterConfig.UpdateConfig(nil, "name", "zhangdeman++++", "123456789", "测试更新"))
|
||||
}
|
Reference in New Issue
Block a user