From 366f6fab5b439f836fde7507cdf347eb81881feb Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Sun, 29 Jun 2025 22:01:25 -0700 Subject: [PATCH] Added test to prevent this and similar issues --- CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- tests/smoke_github_homebrew.rs | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/smoke_github_homebrew.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index c583719..304a49f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## [1.17.1] +- Fixed broken sourcegraph rule +- Added test to prevent this and similar issues + ## [1.17.0] - Updated README to give proper attribution to Nosey Parker! - Added rules for sonarcloud, sonarqube, sourcegraph, shopify, truenas, square, sendgrid, nasa, teamcity, truenas, shopify diff --git a/Cargo.toml b/Cargo.toml index 713a2de..f428453 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ publish = false [package] name = "kingfisher" -version = "1.17.0" +version = "1.17.1" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/tests/smoke_github_homebrew.rs b/tests/smoke_github_homebrew.rs new file mode 100644 index 0000000..710795a --- /dev/null +++ b/tests/smoke_github_homebrew.rs @@ -0,0 +1,20 @@ +use assert_cmd::prelude::*; +use assert_cmd::Command; +use predicates::str::contains; + +#[test] +fn scan_homebrew_github_no_findings() -> anyhow::Result<()> { + Command::cargo_bin("kingfisher")? + .args([ + "scan", + "--git-url", + "https://github.com/homebrew/.github", + "--no-update-check", + ]) + .assert() + .success() + .stdout(contains("|Findings....................: 0")) + .stdout(contains("|__Successful Validations....: 0")) + .stdout(contains("|__Failed Validations........: 0")); + Ok(()) +} \ No newline at end of file