Skip to content

test(artifact): cover GetArtifactVersion#1156

Open
mdabydeen wants to merge 1 commit into
google:mainfrom
mdabydeen:test-artifact-get-artifact-version
Open

test(artifact): cover GetArtifactVersion#1156
mdabydeen wants to merge 1 commit into
google:mainfrom
mdabydeen:test-artifact-get-artifact-version

Conversation

@mdabydeen

Copy link
Copy Markdown

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

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • Closes: N/A
  • Related: N/A

2. Or, if no issue exists, describe the change:

Problem:
GetArtifactVersion on the shared artifact service test suite had no direct test coverage for retrieving the latest version, an explicit version, or the not-found paths for a missing version/file.

Solution:
Add a testArtifactService_GetArtifactVersion sub-test to internal/artifact/tests/service_suite.go that saves three versions of an artifact and exercises GetArtifactVersion for the latest version, an explicit version, a nonexistent version, and a nonexistent file, asserting fs.ErrNotExist for the not-found cases. This runs against both the in-memory and mocked GCS implementations via the shared suite. Also extended the existing empty-service test with a GetArtifactVersion not-found case.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.
ok  	google.golang.org/adk/v2/internal/artifact	0.421s

Manual End-to-End (E2E) Tests:

N/A — test-only change to the shared artifact service test suite.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

N/A

Exercise latest and explicit-version metadata retrieval, including missing-version and missing-file cases, through the shared artifact service suite. The test-only changes run against both in-memory and mocked GCS implementations.
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.

1 participant