Skip to content

test(artifact): cover version lookup after deletion - #1415

Open
mikemikimike wants to merge 1 commit into
google:mainfrom
mikemikimike:codex/issue-681-artifact-delete
Open

test(artifact): cover version lookup after deletion#1415
mikemikimike wants to merge 1 commit into
google:mainfrom
mikemikimike:codex/issue-681-artifact-delete

Conversation

@mikemikimike

Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

Problem:

The shared artifact service contract suite verifies that GetArtifactVersion returns fs.ErrNotExist for an empty service, a missing version, and a missing file, but it does not verify the behavior after an existing artifact is deleted.

Solution:

Extend the shared service suite with a post-deletion GetArtifactVersion assertion. The test runs through the existing in-memory and fake-GCS service implementations and requires an error that matches fs.ErrNotExist.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Passed results:

  • go test -mod=readonly -count=1 -shuffle=on ./artifact/... ./internal/artifact/...
  • docker run ... golang:1.26.6 go test -race -mod=readonly -count=1 -shuffle=on work (all workspace packages passed; the Windows worktree was copied to a temporary Linux directory to normalize CRLF before running the repository's copyright-header test)
  • go build -mod=readonly work
  • go build -mod=readonly ./... in plugin/agentanalytics
  • golangci-lint run --allow-parallel-runners --new-from-rev=HEAD
  • git diff --check and gofmt

Known local limitations:

  • go mod tidy -diff reports a CRLF/LF-only diff on the Windows worktree and does not modify any files.
  • Full golangci-lint run reports pre-existing gofumpt issues in platform/*.go and plugin/agentanalytics/*.go; the changed file is clean under --new-from-rev=HEAD.

Manual End-to-End (E2E) Tests:

Not applicable: this is a backend contract test with no user-facing runtime change or external service setup.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly where needed for this small assertion.
  • I have added tests that prove the behavior after deletion.
  • New and existing unit tests pass locally in the relevant packages and workspace race run.
  • Manual E2E testing is not applicable to this test-only change.
  • No dependent changes are required.

Additional context

No production code or public API behavior is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing contract test coverage for GetArtifactVersion()

1 participant