Skip to content

Commit

Permalink
Cleanup fully after functional tests (#1057)
Browse files Browse the repository at this point in the history
This is the same cleanup which is already being performed on the other
buckets created during the test run.
  • Loading branch information
andreaso authored and kannappanr committed Jan 2, 2019
1 parent f959b29 commit d917552
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions core_test.go
Expand Up @@ -304,6 +304,15 @@ func TestGetObjectContentEncoding(t *testing.T) {
if value[0] != "gzip" {
t.Fatalf("Unexpected content-encoding found, want gzip, got %v", value)
}

err = c.RemoveObject(bucketName, objectName)
if err != nil {
t.Fatal("Error: ", err)
}
err = c.RemoveBucket(bucketName)
if err != nil {
t.Fatal("Error:", err)
}
}

// Tests get bucket policy core API.
Expand Down Expand Up @@ -767,4 +776,13 @@ func TestCoreGetObjectMetadata(t *testing.T) {
if objInfo.Metadata.Get("X-Amz-Meta-Key-1") != "Val-1" {
log.Fatalln("Expected metadata to be available but wasn't")
}

err = core.RemoveObject(bucketName, "my-objectname")
if err != nil {
t.Fatal("Error: ", err)
}
err = core.RemoveBucket(bucketName)
if err != nil {
t.Fatal("Error:", err)
}
}

0 comments on commit d917552

Please sign in to comment.