Skip to content

Commit

Permalink
fix: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Mar 6, 2024
1 parent f4eb64d commit cf285cd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/check/redundancy/redundancy.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, o interf
return fmt.Errorf("upload chunks: %w", err)
}
c.logger.Infof("upload completed. Downloading %s", root.String())
_, err = downloadClient.DownloadBytes(ctx, root, &api.DownloadOptions{RedundancyFallbackMode: &fallbackMode})
if err == nil {
return fmt.Errorf("expected download to fail")
d, err = downloadClient.DownloadBytes(ctx, root, &api.DownloadOptions{RedundancyFallbackMode: &fallbackMode})
if err != nil {
return fmt.Errorf("download bytes: %w", err)
}
if bytes.Equal(data, d) {
return fmt.Errorf("download and initial content should not match")
}

c.logger.Infof("rLevel %d completed successfully", i)
Expand Down

0 comments on commit cf285cd

Please sign in to comment.