Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 113 additions & 140 deletions cmd/ateapi/internal/controlapi/actor_snapshot.go

Large diffs are not rendered by default.

591 changes: 430 additions & 161 deletions cmd/ateapi/internal/controlapi/actor_snapshot_test.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ func TestUpdateActorSnapshotTag_Preconditions(t *testing.T) {
if uid == staleUID {
t.Fatalf("recreated tag reused uid %s, want a fresh one", uid)
}
// No preconditions
// No preconditions. Presence of the guards is the store's to enforce, so
// the rejection carries its wording rather than field paths.
_, err := update(&ateapipb.ResourceMetadata{}, ateapipb.ActorSnapshotTagScope_ACTOR_SNAPSHOT_TAG_SCOPE_PUBLISHED)
assertGrpcError(t, err, codes.InvalidArgument, "[actor_snapshot_tag.metadata.uid: Required value, actor_snapshot_tag.metadata.version: Required value]")
assertGrpcError(t, err, codes.InvalidArgument, fmt.Sprintf("while updating actor snapshot tag %s/%s: persistence: precondition required: uid", testAtespace, tagName))

// The uid from the deleted lifecycle must be rejected, even though the
// atespace/name it was observed under still resolves and the version it
Expand Down
Loading
Loading