Skip to content

Commit

Permalink
Don't try to sign git commits when running tests
Browse files Browse the repository at this point in the history
I have git set up to always sign with a key that requires a password, this would
require me to enter that password when running tests.
Git allows overwriting config for a single invocation, lets just do that
  • Loading branch information
Earlopain committed Jun 5, 2024
1 parent 2a6c00b commit 27bf56f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/rbs/collection/sources/git_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ def test_resolved_revision_updated_after_fetch
git "config", "user.name", "Your Name", chdir: origin_repo
git "checkout", "-b", "main", chdir: origin_repo

git "commit", "--allow-empty", "-m", "Initial commit", chdir: origin_repo
git "-c", "commit.gpgsign=false", "commit", "--allow-empty", "-m", "Initial commit", chdir: origin_repo
sha_initial_commit = git("rev-parse", "HEAD", chdir: origin_repo).chomp

RBS::Collection::Sources::Git.new(name: "test", revision: "main", remote: origin_repo, repo_dir: "gems").tap do |source|
assert_equal sha_initial_commit, source.resolved_revision
end

git "commit", "--allow-empty", "-m", "Second commit", chdir: origin_repo
git "-c", "commit.gpgsign=false", "commit", "--allow-empty", "-m", "Second commit", chdir: origin_repo
sha_second_commit = git("rev-parse", "HEAD", chdir: origin_repo).chomp

RBS::Collection::Sources::Git.new(name: "test", revision: "main", remote: origin_repo, repo_dir: "gems").tap do |source|
Expand Down

0 comments on commit 27bf56f

Please sign in to comment.