[E2E] image lifecycle test scenario

Aperta
#1,677 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@chanchiwai-ray ci sta già lavorando.

Dal 30/11/2026.

  • #1702 di @chanchiwai-ray — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cloud, testing

Direzione di ricerca

Start by reading the repository’s existing end-to-end test scenarios and helpers to see how they create MicroCloud clusters, manage projects and images, and clean up after failures. Add a scenario covering the listed image import, configure, copy, registry and delete operations, with the registry check skipped when no public remote is reachable. It is done when the scenario verifies the expected image lists, fingerprints, properties and cleanup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

As a user, I expect the image lifecycle should works on the microcloud cluster (e.g. Create/Delete/Configure/Copy/Import(-from-registry))

Example

Feature: Image lifecycle

  Background:
    Given a MicroCloud cluster with all members Online
    And the "e2e-testing" project exists
    And the project has at least one existing image

  Scenario: Import an image, configure it, copy it, then delete everything
    Given a randomly generated alias prefixed with "e2e-image-"
    And the image (and any copy of it) is deleted at the end of the scenario,
      even if a prior step fails

    # --- Import (local repackage, exercised once as shared setup) ---
    When I pick an existing image already present in the project
    And I export that image to a local temp directory
    Then the export succeeds and produces a non-empty metadata tarball and
      rootfs file

    When I unpack the metadata tarball and add a new random custom property
      (e.g. "e2e.repackaged=<random>") to its "properties"
    And I repack the modified metadata.yaml (and its templates/ directory)
      into a new metadata tarball
    Then the repacked metadata tarball has a different content hash than the
      original

    When I import the repacked metadata tarball together with the original,
      untouched rootfs file into the project as a new image, with alias "<alias>"
    Then the image is created successfully
    And the image appears in the project's image list under "<alias>"
    And its fingerprint differs from the source image's fingerprint
    And its properties include the custom "e2e.repackaged" marker

    # --- Configure ---
    When I set a new property on the already-created image (not at creation
      time, as a separate update)
    Then the image reports the updated property
    And the original source image used for export remains unaffected

    # --- Copy ---
    When I copy the image into a different project
    Then the copy appears in that project's image list, with the same
      fingerprint as the original
    And updating a property on the copy does not affect the original image's
      properties, and vice versa

    When I delete the copy
    Then the copy no longer appears in that project's image list

    # --- Import from a registry (best-effort, only if a public remote is reachable) ---
    Given a probe of whether any configured public image remote is reachable
    When reachable: I copy a small image from that public remote directly
      into the project, under a new alias
    Then the imported image appears in the project's image list
    When I delete that imported image
    Then it no longer appears in the project's image list
    When not reachable: this is noted explicitly and the registry-import
      check is skipped, without failing the scenario

    # --- Delete ---
    When I delete the repackaged image's alias
    And I delete the repackaged image
    Then it no longer appears in the project's image list
    And the original source image is still present and unmodified
Lingua principale
Go
Stelle
552
Fork
96
Merge medio
4g 10h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di canonical/microcloud

Tutte le issue di canonical/microcloud

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.