Skip to content

Commit

Permalink
Tighen GCP test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Nov 21, 2024
1 parent 7bae6fc commit 621fd40
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions storage/gcp/gcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,16 @@ func TestPublishCheckpoint(t *testing.T) {
if err := storage.init(ctx); err != nil {
t.Fatalf("storage.init: %v", err)
}
m.delete(layout.CheckpointPath)
cpOld := []byte("bananas")
if err := m.setObject(ctx, layout.CheckpointPath, cpOld, nil, ""); err != nil {
t.Fatalf("setObject(bananas): %v", err)
}
m.lMod = test.cpModifiedAt
if err := storage.publishCheckpoint(ctx, test.publishInterval); err != nil {
t.Fatalf("publishCheckpoint: %v", err)
}
_, _, err := m.getObject(ctx, layout.CheckpointPath)
cpUpdated := true
cpNew, _, err := m.getObject(ctx, layout.CheckpointPath)
cpUpdated := !bytes.Equal(cpOld, cpNew)
if err != nil {
if !errors.Is(err, gcs.ErrObjectNotExist) {
t.Fatalf("getObject: %v", err)
Expand Down

0 comments on commit 621fd40

Please sign in to comment.