8000 tests: no coverage for an image ID with multiple tags in image retention and prune · Issue #112 · acidtib/jiji · GitHub
[go: up one dir, main page]

Skip to content

tests: no coverage for an image ID with multiple tags in image retention and prune #112

Open

Description

@acidtib

Summary

No test exercises an image ID that carries more than one tag, which is how #109 and #111 went unnoticed.

Gaps

  • crates/jiji-cli/tests/docker_image_retention_test.rs deliberately builds a different Dockerfile for each version, because an unchanged Dockerfile builds to the same image ID. That is the exact case that breaks in production (repeat deploys of unchanged content).
  • The unit tests in crates/jiji-agent/src/image_retention.rs (logging_engine pattern) never return several tags for one ID.
  • jiji service prune has no case for it either.

Proposed tests

  • Agent unit tests: one ID with three tags inside retain: 1 (expect no removal attempt); an image entirely past the cutoff with several tags (expect each tag removed); an in-use image whose other tags are stale (expect the image kept).
  • A service prune mock-SSH test with repeated IDs in the listing.
  • In the Docker-in-Docker suite, add redeploys of an unchanged Dockerfile alongside the distinct ones, and assert the host converges to retain distinct images with the failure counter at zero.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0