mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix test
This commit is contained in:
parent
ec8de250e2
commit
126fb492d2
|
@ -10,10 +10,10 @@ import (
|
||||||
|
|
||||||
func TestJsonpMarshalUnmarshal(t *testing.T) {
|
func TestJsonpMarshalUnmarshal(t *testing.T) {
|
||||||
|
|
||||||
tv := &volume_server_pb.TieredVolume{
|
tv := &volume_server_pb.RemoteFile{
|
||||||
BackendType: "aws",
|
BackendType: "aws",
|
||||||
BackendName: "",
|
BackendId: "",
|
||||||
Version: 12,
|
FileSize: 12,
|
||||||
}
|
}
|
||||||
|
|
||||||
m := jsonpb.Marshaler{
|
m := jsonpb.Marshaler{
|
||||||
|
@ -29,11 +29,11 @@ func TestJsonpMarshalUnmarshal(t *testing.T) {
|
||||||
|
|
||||||
rawJson := `{
|
rawJson := `{
|
||||||
"backendType":"aws",
|
"backendType":"aws",
|
||||||
"backendName":"temp",
|
"backendId":"temp",
|
||||||
"version":12
|
"FileSize":12
|
||||||
}`
|
}`
|
||||||
|
|
||||||
tv1 := &volume_server_pb.TieredVolume{}
|
tv1 := &volume_server_pb.RemoteFile{}
|
||||||
if err := jsonpb.UnmarshalString(rawJson, tv1); err != nil {
|
if err := jsonpb.UnmarshalString(rawJson, tv1); err != nil {
|
||||||
fmt.Printf("unmarshal error: %v\n", err)
|
fmt.Printf("unmarshal error: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue