container-registry / harbor-satellite

Harbor Satellite (WIP)
Apache License 2.0
9 stars 2 forks source link

Implement E2E Tests for Harbor Satellite with Dagger Go SDK #26

Closed bupd closed 20 hours ago

bupd commented 1 week ago

Background:

The Harbor Satellite project is currently in the Proof of Concept (PoC) stage. The primary functionality involves fetching images from a remote registry, transferring them to a local registry included with the Harbor Satellite, and then logging the transfer process. The goal of this issue is to develop comprehensive end-to-end (E2E) tests using the Dagger Go SDK to validate the workflow and ensure reliability.

Current Status:

Implementation Details:

  1. Create Example Images:

    • Use Dagger Go SDK to generate three container images on the fly.
    • Store these images.
  2. Set Up Harbor Registry:

    • Use Dagger to instantiate a temporary Harbor registry container.
    • Ensure the registry is accessible for image storage and retrieval.
  3. Build and Run Harbor Satellite:

    • Build and execute the Harbor Satellite within a Dagger container for consistency.
  4. Fetch and Store Images:

    • Configure the Harbor Satellite to pull images from the temporary registry.
    • Store the fetched images in the satellite’s local registry.

Steps to Implement E2E Tests:

  1. Generate Example Images:

    • Create a container environment using Dagger.
    • Generate Dockerfiles for three images and build them.
  2. Set Up Harbor Registry:

    • Launch a Harbor registry container using Dagger.
    • Ensure it's accessible for image operations.
  3. Push Images to Harbor Registry:

    • Push generated images to the Harbor registry.
  4. Run Harbor Satellite:

    • Build and run the Harbor Satellite using Dagger.
    • Configure it to pull images from the registry.
  5. Fetch and Store Images:

    • Pull images using the Harbor Satellite.
    • Store the images in the local registry and log the process.
  6. Clean Up:

    • Tear down the Dagger environment and remove temporary containers and registries.

Expected Outcome:

By the end of this issue, we should have a set of E2E tests that validate the Harbor Satellite's ability to fetch and store images from a remote registry. These tests will ensure that the project is reliable and ready for further development and integration.

References: