Skip to content

Storage deletion assertions retain the ! marker #2229

Open

Description

@doomfrawen

Several reconcileStorage tests use a leading ! in assertPaths to indicate that an artifact should not exist. The assertion loops currently retain that marker when building the filesystem path:

absoluteP := filepath.Join(testStorage.BasePath, p)
if !strings.HasPrefix(p, "!") {
    g.Expect(absoluteP).To(BeAnExistingFile())
    continue
}
g.Expect(absoluteP).NotTo(BeAnExistingFile())

For an entry such as !/reconcile-storage/a.txt, the negative assertion checks a path containing the literal !, rather than the intended artifact path. This can let the assertion pass even when the intended artifact remains.

The same pattern appears in the storage tests for:

Proposed correction in each assertion loop:

absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!"))

This preserves the existing distinction between positive and negative assertions while checking the intended path. A standalone Go filesystem check reproduced the mismatch; full repository validation is still pending. This report concerns the test assertions and does not establish a defect in artifact deletion itself.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions