Skip to content

Commit

Permalink
upload an object
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 13, 2024
1 parent c20ce92 commit 5f622a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/test/e2e/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2858,7 +2858,6 @@ func TestContractFundsReturnWhenHostOffline(t *testing.T) {
})
}

// TODO: upload and download
func TestV1ToV2Transition(t *testing.T) {
// create a chain manager with a custom network that starts before the v2
// allow height
Expand Down Expand Up @@ -2921,6 +2920,13 @@ func TestV1ToV2Transition(t *testing.T) {
t.Fatalf("expected %v unique hosts, got %v", nHosts-1, len(contractHosts))
}

// upload some data
data := frand.Bytes(100)
tt.OKAll(cluster.Worker.UploadObject(context.Background(), bytes.NewReader(data), testBucket, "foo", api.UploadObjectOptions{
MinShards: 1,
TotalShards: nHosts - 1,
}))

// mine until we reach the v2 allowheight
cluster.MineBlocks(network.HardforkV2.AllowHeight - cm.Tip().Height)

Expand Down Expand Up @@ -2968,4 +2974,6 @@ func TestV1ToV2Transition(t *testing.T) {
}
delete(usedHosts, c.HostKey)
}

// TODO: check health, contracts and download
}

0 comments on commit 5f622a0

Please sign in to comment.