Skip to content

Commit c090ff2

Browse files
committed
Fix various tests
1 parent 0f413e2 commit c090ff2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/test/java/org/gitlab4j/api/TestDeploymentsApi.java

+7
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ public void testGetDeployments() throws GitLabApiException {
187187
DeploymentStatus.SUCCESS);
188188
}
189189

190+
gitLabApi.getDeploymentsApi().addDeployment(testProject,
191+
environment + "-other",
192+
commits.get(0).getId(),
193+
testProject.getDefaultBranch(),
194+
false,
195+
DeploymentStatus.SUCCESS);
196+
190197
Pager<Deployment> pager = gitLabApi.getDeploymentsApi().getProjectDeployments(testProject, 2);
191198
while (pager.hasNext()) {
192199
pager.next();

src/test/java/org/gitlab4j/api/TestSystemHooksApi.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public void testAddSystemHook() throws GitLabApiException {
6464
assertTrue(hook.getPushEvents());
6565
assertFalse(hook.getTagPushEvents());
6666
assertFalse(hook.getMergeRequestsEvents());
67-
assertFalse(hook.getRepositoryUpdateEvents());
67+
assertTrue(hook.getRepositoryUpdateEvents());
6868
assertTrue(hook.getEnableSslVerification());
6969

7070
gitLabApi.getSystemHooksApi().deleteSystemHook(hook);
7171

7272
hook.withPushEvents(false)
7373
.withTagPushEvents(true)
7474
.withMergeRequestsEvents(true)
75-
.withRepositoryUpdateEvents(true)
75+
.withRepositoryUpdateEvents(false)
7676
.withEnableSslVerification(false);
7777

7878
SystemHook updatedHook = gitLabApi.getSystemHooksApi().addSystemHook(TEST_HOOK_URL, TEST_SECRET_TOKEN, hook);
@@ -81,10 +81,10 @@ public void testAddSystemHook() throws GitLabApiException {
8181
assertFalse(hook.getPushEvents());
8282
assertTrue(hook.getTagPushEvents());
8383
assertTrue(hook.getMergeRequestsEvents());
84-
assertTrue(hook.getRepositoryUpdateEvents());
84+
assertFalse(hook.getRepositoryUpdateEvents());
8585
assertFalse(hook.getEnableSslVerification());
8686

87-
gitLabApi.getSystemHooksApi().deleteSystemHook(hook);
87+
gitLabApi.getSystemHooksApi().deleteSystemHook(updatedHook);
8888

8989
}
9090

0 commit comments

Comments
 (0)