Unverified Commit c090ff2d authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze
Browse files

Fix various tests

parent 0f413e28
...@@ -187,6 +187,13 @@ public class TestDeploymentsApi extends AbstractIntegrationTest { ...@@ -187,6 +187,13 @@ public class TestDeploymentsApi extends AbstractIntegrationTest {
DeploymentStatus.SUCCESS); DeploymentStatus.SUCCESS);
} }
gitLabApi.getDeploymentsApi().addDeployment(testProject,
environment + "-other",
commits.get(0).getId(),
testProject.getDefaultBranch(),
false,
DeploymentStatus.SUCCESS);
Pager<Deployment> pager = gitLabApi.getDeploymentsApi().getProjectDeployments(testProject, 2); Pager<Deployment> pager = gitLabApi.getDeploymentsApi().getProjectDeployments(testProject, 2);
while (pager.hasNext()) { while (pager.hasNext()) {
pager.next(); pager.next();
......
...@@ -64,7 +64,7 @@ public class TestSystemHooksApi extends AbstractIntegrationTest { ...@@ -64,7 +64,7 @@ public class TestSystemHooksApi extends AbstractIntegrationTest {
assertTrue(hook.getPushEvents()); assertTrue(hook.getPushEvents());
assertFalse(hook.getTagPushEvents()); assertFalse(hook.getTagPushEvents());
assertFalse(hook.getMergeRequestsEvents()); assertFalse(hook.getMergeRequestsEvents());
assertFalse(hook.getRepositoryUpdateEvents()); assertTrue(hook.getRepositoryUpdateEvents());
assertTrue(hook.getEnableSslVerification()); assertTrue(hook.getEnableSslVerification());
gitLabApi.getSystemHooksApi().deleteSystemHook(hook); gitLabApi.getSystemHooksApi().deleteSystemHook(hook);
...@@ -72,7 +72,7 @@ public class TestSystemHooksApi extends AbstractIntegrationTest { ...@@ -72,7 +72,7 @@ public class TestSystemHooksApi extends AbstractIntegrationTest {
hook.withPushEvents(false) hook.withPushEvents(false)
.withTagPushEvents(true) .withTagPushEvents(true)
.withMergeRequestsEvents(true) .withMergeRequestsEvents(true)
.withRepositoryUpdateEvents(true) .withRepositoryUpdateEvents(false)
.withEnableSslVerification(false); .withEnableSslVerification(false);
SystemHook updatedHook = gitLabApi.getSystemHooksApi().addSystemHook(TEST_HOOK_URL, TEST_SECRET_TOKEN, hook); SystemHook updatedHook = gitLabApi.getSystemHooksApi().addSystemHook(TEST_HOOK_URL, TEST_SECRET_TOKEN, hook);
...@@ -81,10 +81,10 @@ public class TestSystemHooksApi extends AbstractIntegrationTest { ...@@ -81,10 +81,10 @@ public class TestSystemHooksApi extends AbstractIntegrationTest {
assertFalse(hook.getPushEvents()); assertFalse(hook.getPushEvents());
assertTrue(hook.getTagPushEvents()); assertTrue(hook.getTagPushEvents());
assertTrue(hook.getMergeRequestsEvents()); assertTrue(hook.getMergeRequestsEvents());
assertTrue(hook.getRepositoryUpdateEvents()); assertFalse(hook.getRepositoryUpdateEvents());
assertFalse(hook.getEnableSslVerification()); assertFalse(hook.getEnableSslVerification());
gitLabApi.getSystemHooksApi().deleteSystemHook(hook); gitLabApi.getSystemHooksApi().deleteSystemHook(updatedHook);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment