Skip to content

Commit

Permalink
chore: update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
OasisLCrypto committed Dec 10, 2024
1 parent f46af2f commit f424b70
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions walrus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ func TestStoreFromReader(t *testing.T) {
}
}

// TestStoreFromReaderWihoutContentLength tests storing data from a reader
func TestStoreFromReaderWihoutContentLength(t *testing.T) {
client := newTestClient(t)
reader := strings.NewReader(testContent)

resp, err := client.StoreFromReader(reader, -1, &StoreOptions{Epochs: 1})
if err != nil {
t.Fatalf("Failed to store data from reader: %v", err)
}

resp.NormalizeBlobResponse()
if resp.Blob.BlobID == "" {
t.Error("StoreFromReader operation failed: received empty blob ID in response")
}
}

// TestStoreFromURL tests storing data from a URL
func TestStoreFromURL(t *testing.T) {
client := newTestClient(t)
Expand Down

0 comments on commit f424b70

Please sign in to comment.