Skip to content

Commit accfe94

Browse files
committed
test: add tests for the new behavior in the rebase engine
1 parent b66802b commit accfe94

4 files changed

Lines changed: 395 additions & 5 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*.tar
22
!four-commits-signed.tar
33
!workspace-signed.tar
4-
!workspace-with-wc-content-signed.tar
4+
!workspace-with-wc-content-signed.tar
5+
!unsigned-commits-with-signing-key-setup-but-signing-disabled.tar
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
#
3+
# Description: Scenario with unsigned commits and commit signing disabled, but
4+
# all the requisite configuration to sign commits is present.
5+
#
6+
# The scenario is designed to be used to test signing of commits in the absence
7+
# of other changes.
8+
9+
set -eu -o pipefail
10+
11+
git init
12+
13+
ssh-keygen -t rsa -b 2048 -C "test@example.com" -N "" -f signature.key
14+
git config gpg.format ssh
15+
git config user.signingKey "$PWD/signature.key"
16+
echo "*.key*" >.gitignore
17+
18+
echo "base" >base && git add . && git commit -m "base"
19+
git update-ref refs/heads/base $(git rev-parse HEAD)
20+
echo "mid" >mid && git add . && git commit -m "mid"
21+
git update-ref refs/heads/mid $(git rev-parse HEAD)
22+
echo "top" >top && git add . && git commit -m "top"
23+
git update-ref refs/heads/top $(git rev-parse HEAD)

0 commit comments

Comments
 (0)