changeset 650:919418bf09a1

Fix tests: testData requires hg 1.7
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Fri, 27 Sep 2013 12:02:28 +0400
parents 0b50d7952a7d
children 3db16531f7ba
files mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/TagsTest.java
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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"));