Skip to content

Commit

Permalink
do not sign git commits in tests (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
car-roll authored Jul 23, 2023
1 parent bd2541c commit 327f4d0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private String initGitLabProject(String url, boolean addFeatureBranch) throws Gi
// Setup remote master branch
tmp.newFile("test");
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
git.push()
.setRemote("origin")
.add("master")
Expand All @@ -262,7 +262,7 @@ private String initGitLabProject(String url, boolean addFeatureBranch) throws Gi
// Setup remote feature branch
git.checkout().setName("feature").setCreateBranch(true).call();
tmp.newFile("feature");
commit = git.commit().setMessage("feature").call();
commit = git.commit().setSign(false).setMessage("feature").call();
git.push()
.setRemote("origin")
.add("feature")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public void mergeRequest_build_only_when_state_modified()
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);
String repositoryUrl = tmp.getRoot().toURI().toString();

Expand Down Expand Up @@ -511,7 +511,7 @@ private OneShotEvent doHandle(
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);
String repositoryUrl = tmp.getRoot().toURI().toString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void note_build() throws IOException, InterruptedException, GitAPIExcepti
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);
String repositoryUrl = tmp.getRoot().toURI().toString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void setup() throws IOException, GitAPIException {
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
git.commit().setMessage("test").call();
git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);

pipelineHookTriggerHandler = new PipelineHookTriggerHandlerImpl(allowedStates);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void push_build() throws IOException, InterruptedException, GitAPIExcepti
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);
String repositoryUrl = tmp.getRoot().toURI().toString();

Expand Down Expand Up @@ -141,7 +141,7 @@ public void push_build2DifferentBranchesButSameCommit()
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
ObjectId head = git.getRepository().resolve(Constants.HEAD);
String repositoryUrl = tmp.getRoot().toURI().toString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void setup() throws Exception {
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
commitSha1 = commit.getId().getName();
gitRepoUrl = tmp.getRoot().toURI().toString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void setup() throws Exception {
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
commitSha1 = commit.getId().getName();
gitRepoUrl = tmp.getRoot().toURI().toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void setup() throws Exception {
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
commitSha1 = commit.getId().getName();
gitRepoUrl = tmp.getRoot().toURI().toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void setup() throws Exception {
tmp.newFile("test");
Git git = Git.open(tmp.getRoot());
git.add().addFilepattern("test");
RevCommit commit = git.commit().setMessage("test").call();
RevCommit commit = git.commit().setSign(false).setMessage("test").call();
commitSha1 = commit.getId().getName();
gitRepoUrl = tmp.getRoot().toURI().toString();
}
Expand Down

0 comments on commit 327f4d0

Please sign in to comment.