Avoid printing in S3 tests (#7043)

master
Harshavardhana 6 years ago committed by Nitish Tiwari
parent 5a80cbec2a
commit 7f2d439baa
  1. 6
      cmd/gateway/s3/gateway-s3-metadata_test.go

@ -63,12 +63,16 @@ func TestReadGWMetadata(t *testing.T) {
for i, tt := range tests {
buf := bytes.NewBufferString(tt.metaStr)
m, err := readGWMetadata(context.Background(), *buf)
t.Log(m)
if err != nil && tt.pass {
t.Errorf("Test %d: Expected parse gw metadata to succeed, but failed", i)
}
if err == nil && !tt.pass {
t.Errorf("Test %d: Expected parse gw metadata to succeed, but failed", i)
}
if err == nil {
if m.Version != gwMetaVersion {
t.Errorf("Test %d: Expected version %s, but failed with %s", i, gwMetaVersion, m.Version)
}
}
}
}

Loading…
Cancel
Save