From 1d0b33b48f8bd3d38c863f25c0a159143f590eb7 Mon Sep 17 00:00:00 2001 From: "Clarence \"Sparr\" Risher" Date: Tue, 20 Sep 2022 23:39:58 +0000 Subject: [PATCH] Use main branch instead of master in tests --- test/git-secrets.bats | 2 +- test/prepare-commit-msg.bats | 4 ++-- test/test_helper.bash | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/git-secrets.bats b/test/git-secrets.bats index b7a5b1c..dcfde90 100644 --- a/test/git-secrets.bats +++ b/test/git-secrets.bats @@ -66,7 +66,7 @@ load test_helper echo '@todo' > $TEST_REPO/history_failure.txt git add -A git commit -m "Testing history" - git checkout master + git checkout main cd - repo_run git-secrets --scan-history [ $status -eq 1 ] diff --git a/test/prepare-commit-msg.bats b/test/prepare-commit-msg.bats index a211c13..85aaaf6 100644 --- a/test/prepare-commit-msg.bats +++ b/test/prepare-commit-msg.bats @@ -13,7 +13,7 @@ load test_helper echo 'Fixing!' > data.txt git add -A git commit -m 'Fixing commit' - git checkout master + git checkout main run git merge --no-ff feature [ $status -eq 1 ] } @@ -27,7 +27,7 @@ load test_helper echo 'Not bad' > data.txt git add -A git commit -m 'Good commit' - git checkout master + git checkout main run git merge --no-ff feature [ $status -eq 0 ] } diff --git a/test/test_helper.bash b/test/test_helper.bash index e0e93a2..a74232b 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -30,7 +30,7 @@ setup_repo() { delete_repo mkdir -p $TEST_REPO cd $TEST_REPO - git init --initial-branch=master + git init --initial-branch=main git config --local --add secrets.patterns '@todo' git config --local --add secrets.patterns 'forbidden|me' git config --local --add secrets.patterns '#hash'