use of com.google.gerrit.extensions.api.projects.ProjectInput in project gerrit by GerritCodeReview.
the class CreateProjectIT method createProjectHttpWithNameMismatch_BadRequest.
@Test
public void createProjectHttpWithNameMismatch_BadRequest() throws Exception {
ProjectInput in = new ProjectInput();
in.name = name("otherName");
adminRestSession.put("/projects/" + name("someName"), in).assertBadRequest();
}
use of com.google.gerrit.extensions.api.projects.ProjectInput in project gerrit by GerritCodeReview.
the class CreateProjectIT method createProjectHttpWithInvalidRefName_BadRequest.
@Test
public void createProjectHttpWithInvalidRefName_BadRequest() throws Exception {
ProjectInput in = new ProjectInput();
in.branches = Collections.singletonList(name("invalid ref name"));
adminRestSession.put("/projects/" + name("newProject"), in).assertBadRequest();
}
use of com.google.gerrit.extensions.api.projects.ProjectInput in project gerrit by GerritCodeReview.
the class CreateProjectIT method createProjectWithNonExistingOwner_UnprocessableEntity.
@Test
public void createProjectWithNonExistingOwner_UnprocessableEntity() throws Exception {
ProjectInput in = new ProjectInput();
in.name = name("newProjectName");
in.owners = Collections.singletonList("non-existing-group");
assertCreateFails(in, UnprocessableEntityException.class);
}
use of com.google.gerrit.extensions.api.projects.ProjectInput in project gerrit by GerritCodeReview.
the class CreateProjectIT method createProjectWithEmptyCommit.
@Test
public void createProjectWithEmptyCommit() throws Exception {
String newProjectName = name("newProject");
ProjectInput in = new ProjectInput();
in.name = newProjectName;
in.createEmptyCommit = true;
gApi.projects().create(in);
assertEmptyCommit(newProjectName, "refs/heads/master");
}
use of com.google.gerrit.extensions.api.projects.ProjectInput in project gerrit by GerritCodeReview.
the class CreateProjectIT method createPermissionOnlyProject.
@Test
public void createPermissionOnlyProject() throws Exception {
String newProjectName = name("newProject");
ProjectInput in = new ProjectInput();
in.name = newProjectName;
in.permissionsOnly = true;
gApi.projects().create(in);
assertHead(newProjectName, RefNames.REFS_CONFIG);
}
Aggregations