Correct inheriting superproject subscription test
First we need to setup the ACL inheritance for the project being subscribed to and not the superproject. And we also need to change the branches that are setup to be correct. And once that is done, the expectation of success changes as well. I think this mistake was introduced by too much copy&paste from the test directly above (testSubscriptionFailOnWrongBranchACL) Change-Id: Ibcaaa33bec9149dcd4c77660eba710f9b5a177b9 Signed-off-by: Stefan Beller <sbeller@google.com>
This commit is contained in:
@@ -339,18 +339,20 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
|
||||
@Test
|
||||
public void testSubscriptionInheritACL() throws Exception {
|
||||
createProjectWithPush("config-repo");
|
||||
TestRepository<?> superRepo = createProjectWithPush("super-project",
|
||||
createProjectWithPush("config-repo2",
|
||||
new Project.NameKey(name("config-repo")));
|
||||
TestRepository<?> subRepo = createProjectWithPush("subscribed-to-project");
|
||||
allowSubmoduleSubscription("config-repo", "refs/heads/master",
|
||||
"super-project", "refs/heads/wrong-branch");
|
||||
TestRepository<?> superRepo = createProjectWithPush("super-project");
|
||||
TestRepository<?> subRepo = createProjectWithPush("subscribed-to-project",
|
||||
new Project.NameKey(name("config-repo2")));
|
||||
allowSubmoduleSubscription("config-repo", "refs/heads/*",
|
||||
"super-project", "refs/heads/*");
|
||||
|
||||
pushChangeTo(subRepo, "master");
|
||||
createSubmoduleSubscription(superRepo, "master",
|
||||
"subscribed-to-project", "master");
|
||||
pushChangeTo(subRepo, "master");
|
||||
assertThat(hasSubmodule(superRepo, "master",
|
||||
"subscribed-to-project")).isFalse();
|
||||
ObjectId subHEAD = pushChangeTo(subRepo, "master");
|
||||
expectToHaveSubmoduleState(superRepo, "master",
|
||||
"subscribed-to-project", subHEAD);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user