Skip to content

verify_archive_test's must_contain_regex always passes #909

@krakeusz

Description

@krakeusz

Hey,
The below pseudocode will always pass regardless of the contents of pkg_tar-generated tarball:

load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_pkg//pkg:verify_archive.bzl", "verify_archive_test")

pkg_tar(
    name = "a_tarball",
    srcs = [ ... ],
)

verify_archive_test(
    name = "verify_package_contents",
    must_contain_regex = [
        "anything_really",
    ],
    target = ":a_tarball",
)

Problem is with must_contain_regex implementation. The variable match is undefined and should be matched. A simple typo, apparently not tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions