Search in sources :

Example 16 with ProjectAccessInput

use of com.google.gerrit.extensions.api.access.ProjectAccessInput in project gerrit by GerritCodeReview.

the class AccessIT method updateParentAsAdministrator.

@Test
public void updateParentAsAdministrator() throws Exception {
    // Create parent
    String newParentProjectName = createProject(PROJECT_NAME + "PA").get();
    // Set new parent
    ProjectAccessInput accessInput = newProjectAccessInput();
    accessInput.parent = newParentProjectName;
    gApi.projects().name(newProjectName).access(accessInput);
    assertThat(pApi.access().inheritsFrom.name).isEqualTo(newParentProjectName);
}
Also used : ProjectAccessInput(com.google.gerrit.extensions.api.access.ProjectAccessInput) Test(org.junit.Test) AbstractDaemonTest(com.google.gerrit.acceptance.AbstractDaemonTest)

Aggregations

ProjectAccessInput (com.google.gerrit.extensions.api.access.ProjectAccessInput)16 AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)15 Test (org.junit.Test)15 AccessSectionInfo (com.google.gerrit.extensions.api.access.AccessSectionInfo)13 PermissionInfo (com.google.gerrit.extensions.api.access.PermissionInfo)4 PermissionRuleInfo (com.google.gerrit.extensions.api.access.PermissionRuleInfo)2 ProjectAccessInfo (com.google.gerrit.extensions.api.access.ProjectAccessInfo)2 AccountGroup (com.google.gerrit.reviewdb.client.AccountGroup)2 PushOneCommit (com.google.gerrit.acceptance.PushOneCommit)1 Project (com.google.gerrit.reviewdb.client.Project)1 InMemoryRepository (org.eclipse.jgit.internal.storage.dfs.InMemoryRepository)1 Config (org.eclipse.jgit.lib.Config)1 RevCommit (org.eclipse.jgit.revwalk.RevCommit)1