|
@@ -25,7 +25,7 @@ func init() {
|
|
|
func Test_CreateDomain(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.DomainReq{Name: "xzh", MetaFields: []string{"docName", "docSuffix", "docSize"}}
|
|
|
+ req := &filesystem.DomainReq{Name: "jy-oss-xzh", MetaFields: []string{"docName", "docSuffix", "docSize"}}
|
|
|
res, err := FileSystem.CreateDomain(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -35,7 +35,7 @@ func Test_CreateDomain(t *testing.T) {
|
|
|
func Test_DeleteDomain(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.DomainReq{Name: "xzh", MetaFields: []string{"docName", "docSuffix", "docSize"}}
|
|
|
+ req := &filesystem.DomainReq{Name: "jy-oss-xzh", MetaFields: []string{"docName", "docSuffix", "docSize"}}
|
|
|
res, err := FileSystem.DeleteDomain(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -45,7 +45,7 @@ func Test_DeleteDomain(t *testing.T) {
|
|
|
func Test_UpdateDomainMeta(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.DomainReq{Name: "xzh", MetaFields: []string{"docName", "docSuffix", "docSize", "docPage"}}
|
|
|
+ req := &filesystem.DomainReq{Name: "jy-oss-xzh", MetaFields: []string{"docName", "docSuffix", "docSize", "docPage"}}
|
|
|
res, err := FileSystem.UpdateDomainMeta(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -55,7 +55,7 @@ func Test_UpdateDomainMeta(t *testing.T) {
|
|
|
func Test_DeleteFile(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.LoadFileReq{Domain: "xzh", FileId: "que.txt"}
|
|
|
+ req := &filesystem.LoadFileReq{Domain: "jy-oss-xzh", FileId: "que.txt"}
|
|
|
res, err := FileSystem.DeleteFile(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -65,7 +65,7 @@ func Test_DeleteFile(t *testing.T) {
|
|
|
func Test_GetFile(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.LoadFileReq{Domain: "xzh", FileId: "que.txt"}
|
|
|
+ req := &filesystem.LoadFileReq{Domain: "jy-oss-xzh", FileId: "que.txt"}
|
|
|
res, err := FileSystem.GetFile(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -75,7 +75,7 @@ func Test_GetFile(t *testing.T) {
|
|
|
func Test_GetFileMeta(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
- req := &filesystem.LoadFileReq{Domain: "xzh", FileId: "que.txt"}
|
|
|
+ req := &filesystem.LoadFileReq{Domain: "jy-oss-xzh", FileId: "que.txt"}
|
|
|
res, err := FileSystem.GetFileMeta(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
log.Println("req ", res)
|
|
@@ -103,7 +103,7 @@ func Test_SaveFile(t *testing.T) {
|
|
|
}
|
|
|
log.Println(count)
|
|
|
req := &filesystem.SaveFileReq{
|
|
|
- Domain: "xzh",
|
|
|
+ Domain: "jy-oss-xzh",
|
|
|
FileId: "111.txt",
|
|
|
Meta: map[string]string{"docName": "111", "docSuffix": ".txt", "docSize": "1024"},
|
|
|
RawFileContent: data,
|
|
@@ -118,7 +118,7 @@ func Test_UpdateFileMeta(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
|
|
FileSystem := filesystemclient.NewFileSystem(zrpc.MustNewClient(C.FileSystemConf))
|
|
|
req := &filesystem.UpdateFileMetaReq{
|
|
|
- Domain: "xzh",
|
|
|
+ Domain: "jy-oss-xzh",
|
|
|
FileId: "que.txt",
|
|
|
Meta: map[string]string{"docName": "que", "docSuffix": ".txt", "docSize": "2048"},
|
|
|
}
|