# HG changeset patch # User Dmitry Neverov # Date 1380268948 -14400 # Node ID 919418bf09a17afbdfacf866a3747dc6d6612d6b # Parent 0b50d7952a7d133f3a94ec1eb0035b702eec2c69 Fix tests: testData requires hg 1.7 diff -r 0b50d7952a7d -r 919418bf09a1 mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/TagsTest.java --- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/TagsTest.java Thu Sep 26 16:28:57 2013 +0400 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/TagsTest.java Fri Sep 27 12:02:28 2013 +0400 @@ -16,7 +16,8 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.not; -@Test +@RequiredHgVersion(min = "1.7.0") +@Test(dataProviderClass = HgVersionConstraint.class, dataProvider = "installedHgVersion") public class TagsTest extends BaseMercurialTestCase { private File myRemoteRepository; @@ -33,27 +34,27 @@ Util.copyRepository(new File("mercurial-tests/testData/tags"), myRemoteRepository); } - public void no_tags_reported_by_default() throws Exception { + public void no_tags_reported_by_default(HgVersion _) throws Exception { VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).build(); RepositoryStateData state = getVcs().getCollectChangesPolicy().getCurrentState(root); assertThat(state, not(hasBranch("v1").withRevision("fa7ad5b80a88"))); assertThat(state, not(hasBranch("v4").withRevision("f7fbcc489e40"))); } - public void should_report_tag_revisions() throws Exception { + public void should_report_tag_revisions(HgVersion _) throws Exception { VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).withTagsEnabled(true).build(); RepositoryStateData state = getVcs().getCollectChangesPolicy().getCurrentState(root); assertThat(state, hasBranch("v1").withRevision("fa7ad5b80a88")); assertThat(state, hasBranch("v4").withRevision("f7fbcc489e40")); } - public void branch_has_higher_precedence_over_tag() throws Exception { + public void branch_has_higher_precedence_over_tag(HgVersion _) throws Exception { VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).withTagsEnabled(true).build(); RepositoryStateData state = getVcs().getCollectChangesPolicy().getCurrentState(root); assertThat(state, hasBranch("topic").withRevision("efde33cd0b66")); } - public void tags_can_be_turned_off_globally() throws Exception { + public void tags_can_be_turned_off_globally(HgVersion _) throws Exception { myConfig.withTagsAsBranches(false); VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).withTagsEnabled(true).build(); RepositoryStateData state = getVcs().getCollectChangesPolicy().getCurrentState(root); @@ -61,7 +62,7 @@ assertThat(state, not(hasBranch("v4").withRevision("f7fbcc489e40"))); } - public void tags_should_not_include_tip() throws Exception { + public void tags_should_not_include_tip(HgVersion _) throws Exception { VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).withTagsEnabled(true).build(); RepositoryStateData state = getVcs().getCollectChangesPolicy().getCurrentState(root); assertThat(state, hasNoBranch("tip"));