From 3fa49cf32ded58f91600ce402933d5d0deba5f1e Mon Sep 17 00:00:00 2001 From: Benjamin Ritter Date: Mon, 22 Jan 2024 23:06:24 +0100 Subject: [PATCH 1/2] fix: Add Cleanup Function to Test --- client_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client_test.go b/client_test.go index 3f59f00..3a79ffe 100644 --- a/client_test.go +++ b/client_test.go @@ -40,6 +40,7 @@ func TestMain(m *testing.M) { } func TestDescribeFile(t *testing.T) { + t.Cleanup(func() { DeleteTestPath(t) }) _, name := UploadRandomFile1MB(t) obj, err := bunnyclient.Describe(name) if err != nil { From 27a04afebaecd3ef398bad5f9eb98507c9fbb1d7 Mon Sep 17 00:00:00 2001 From: Benjamin Ritter Date: Mon, 22 Jan 2024 23:07:02 +0100 Subject: [PATCH 2/2] fix: Write out result in describe function --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index fd3522c..fc243a7 100644 --- a/client.go +++ b/client.go @@ -134,7 +134,7 @@ func (c *Client) Describe(path string) (Object, error) { resp, err := c.R(). SetHeader("Accept", "application/json"). - SetResult(object). + SetResult(&object). Execute("DESCRIBE", path) c.logger.Debugf("Describe Request Response: %v", resp)