Commit 8febc1e6 authored by Greg Messner's avatar Greg Messner
Browse files

Added test for triggerHousekeeping() (#433).

parent 0a3911cf
...@@ -2932,18 +2932,15 @@ public class ProjectApi extends AbstractApi implements Constants { ...@@ -2932,18 +2932,15 @@ public class ProjectApi extends AbstractApi implements Constants {
"projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId); "projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId);
} }
/** /**
* Start the Housekeeping task for a project. * Start the Housekeeping task for a project.
* *
* <pre> * <pre><code>GitLab Endpoint: POST /projects/:id/housekeeping</code></pre>
* <code>GitLab Endpoint: POST /projects/:id/housekeeping</code> *
* </pre> * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* * @throws GitLabApiException if any exception occurs
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance */
* @throws GitLabApiException if any exception occurs public void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException {
*/ post(Response.Status.OK, (Form) null, "projects", getProjectIdOrPath(projectIdOrPath), "housekeeping");
public void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException { }
Form formData = null;
post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "housekeeping");
}
} }
...@@ -855,4 +855,10 @@ public class TestProjectApi extends AbstractIntegrationTest { ...@@ -855,4 +855,10 @@ public class TestProjectApi extends AbstractIntegrationTest {
Optional<ProjectFetches> statistics = gitLabApi.getProjectApi().getOptionalProjectStatistics(testProject); Optional<ProjectFetches> statistics = gitLabApi.getProjectApi().getOptionalProjectStatistics(testProject);
assertTrue(statistics.isPresent()); assertTrue(statistics.isPresent());
} }
@Test
public void testTriggerHousekeeping() throws GitLabApiException {
assertNotNull(testProject);
gitLabApi.getProjectApi().triggerHousekeeping(testProject);
}
} }
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