Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify_archive_test's must_contain_regex always passes #909

Open
krakeusz opened this issue Jan 8, 2025 · 0 comments · May be fixed by #910
Open

verify_archive_test's must_contain_regex always passes #909

krakeusz opened this issue Jan 8, 2025 · 0 comments · May be fixed by #910

Comments

@krakeusz
Copy link

krakeusz commented Jan 8, 2025

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.

@krakeusz krakeusz linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant