diff --git a/src/ScmBackup.Tests.Integration/Hosters/GithubBackupTests.cs b/src/ScmBackup.Tests.Integration/Hosters/GithubBackupTests.cs index 8253ca0..6e29e16 100644 --- a/src/ScmBackup.Tests.Integration/Hosters/GithubBackupTests.cs +++ b/src/ScmBackup.Tests.Integration/Hosters/GithubBackupTests.cs @@ -17,19 +17,9 @@ public class GithubBackupTests : IBackupTests internal override string PrivateUserName { get { return TestHelper.EnvVar("Github_Name"); } } internal override string PrivateRepoName { get { return TestHelper.EnvVar("Github_RepoPrivate"); } } - internal override HashSet TestsToSkip + protected override bool SkipTestsIssue15() { - get - { - var t = new HashSet(); - - if (TestHelper.RunsOnAppVeyor()) - { - // t.Add("DoesntBackupWikiIfNotSet"); - } - - return t; - } + return TestHelper.RunsOnAppVeyor(); } protected override void Setup(bool usePrivateRepo) diff --git a/src/ScmBackup.Tests.Integration/Hosters/IBackupTests.cs b/src/ScmBackup.Tests.Integration/Hosters/IBackupTests.cs index 9ada7f1..36e16c2 100644 --- a/src/ScmBackup.Tests.Integration/Hosters/IBackupTests.cs +++ b/src/ScmBackup.Tests.Integration/Hosters/IBackupTests.cs @@ -29,8 +29,12 @@ protected virtual void AssertIssues(string dir) { } internal virtual string PrivateRepoName { get { return null; } } protected virtual void AssertPrivateRepo(string dir) { } - // The child classes need to implement this, if they need to skip some tests - internal virtual HashSet TestsToSkip { get { return new HashSet(); } } + // skip certain tests because of https://github.com/christianspecht/scm-backup/issues/15 + // Child classes which need to skip those tests need to implement this and return true + protected virtual bool SkipTestsIssue15() + { + return false; + } [Fact] public void MakesBackup() @@ -71,7 +75,7 @@ public void MakesBackupOfPrivateRepo() [SkippableFact] public void DoesntBackupWikiIfNotSet() { - Skip.If(this.TestsToSkip.Contains("DoesntBackupWikiIfNotSet")); + Skip.If(this.SkipTestsIssue15()); var dir = DirectoryHelper.CreateTempDirectory(this.DirSuffix("doesnt-backup-wiki")); this.Setup(false);