Superproject Subscriptions: test more corner cases

With the previous commit in this makes sure there are no errors in
the push.

Change-Id: I615b109f9994658343ab2edf82019caa1ba6c8ca
This commit is contained in:
Stefan Beller
2016-06-03 18:03:45 -07:00
parent 4a85c9db24
commit d40b14f1e8

View File

@@ -107,6 +107,33 @@ public class SubmoduleSubscriptionsIT extends AbstractSubmoduleSubscription {
"subscribed-to-project", subHEAD);
}
@Test
public void testSubscriptionWildcardACLForMissingProject() throws Exception {
TestRepository<?> subRepo = createProjectWithPush("subscribed-to-project");
allowSubmoduleSubscription("subscribed-to-project", "refs/heads/*",
"not-existing-super-project", "refs/heads/*");
pushChangeTo(subRepo, "master");
}
@Test
public void testSubscriptionWildcardACLForMissingBranch() throws Exception {
createProjectWithPush("super-project");
TestRepository<?> subRepo = createProjectWithPush("subscribed-to-project");
allowSubmoduleSubscription("subscribed-to-project", "refs/heads/*",
"super-project", "refs/heads/*");
pushChangeTo(subRepo, "foo");
}
@Test
public void testSubscriptionWildcardACLForMissingGitmodules() throws Exception {
TestRepository<?> superRepo = createProjectWithPush("super-project");
TestRepository<?> subRepo = createProjectWithPush("subscribed-to-project");
allowSubmoduleSubscription("subscribed-to-project", "refs/heads/*",
"super-project", "refs/heads/*");
pushChangeTo(superRepo, "master");
pushChangeTo(subRepo, "master");
}
@Test
public void testSubscriptionWildcardACLOneOnOneMapping() throws Exception {
TestRepository<?> superRepo = createProjectWithPush("super-project");