Skip to content

tests: support Pester 6 with no changed bucket manifests #6693

Description

@SeWieland

Summary

Scoop's current test harness is not clean under Pester 6 when no bucket manifests changed.

Our bucket CI reproduces this in both Windows matrix jobs:

The job currently reports Container failed: 1 during discovery but can still appear green because the wrapper only checked FailedCount.

Cause

test/Import-Bucket-Tests.ps1 builds $manifestFiles from changed JSON files and then passes the result to:

It '<_>' -TestCases $manifestFiles {

When a commit changes only CI or other non-manifest files, $manifestFiles is empty. Pester 6 now fails discovery for an empty -TestCases collection:

Value can not be null or empty array

Proposed fix

Because an empty manifest set is valid for this changed-file test, allow it explicitly:

It '<_>' -TestCases $manifestFiles -AllowNullOrEmptyForEach {

LLM Disclosure

GPT-5.6-Luna was used for this analysis

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