Beispiel #1
0
        public void Should_ReturnFalse_When_OneNode5_1_12()
        {
            var cluster = Mock.Of <IInternalCluster>();

            Mock.Get(cluster).Setup(c => c.AllHosts()).Returns(GetHosts("5.1.12"));

            var target = new InsightsSupportVerifier();

            Assert.IsFalse(target.SupportsInsights(cluster));
        }
Beispiel #2
0
        public void Should_ReturnTrue_When_OneNode_6_1_0_AndOneNode_6_0_5()
        {
            var cluster = Mock.Of <IInternalCluster>();

            Mock.Get(cluster).Setup(c => c.AllHosts()).Returns(GetHosts("6.1.0", "6.0.5"));

            var target = new InsightsSupportVerifier();

            Assert.IsTrue(target.SupportsInsights(cluster));
        }
Beispiel #3
0
        public void Should_ReturnFalse_When_TwoNodes_6_0_4()
        {
            var cluster = Mock.Of <IInternalCluster>();

            Mock.Get(cluster).Setup(c => c.AllHosts()).Returns(GetHosts("6.0.4", "6.0.4"));

            var target = new InsightsSupportVerifier();

            Assert.IsFalse(target.SupportsInsights(cluster));
        }
        public void ApplyToTest(NUnit.Framework.Internal.Test test)
        {
            if (!TestClusterManager.IsDse)
            {
                test.RunState = RunState.Ignored;
                test.Properties.Set("_SKIPREASON", $"Test designed to run with DSE version that supports Insights (executing OSS {TestClusterManager.CassandraVersion})");
                return;
            }

            var executingVersion        = TestClusterManager.DseVersion;
            var insightsSupportVerifier = new InsightsSupportVerifier();

            if (insightsSupportVerifier.DseVersionSupportsInsights(executingVersion))
            {
                return;
            }

            test.RunState = RunState.Ignored;
            var message = $"Test designed to run with DSE version that supports Insights (executing {executingVersion})";

            test.Properties.Set("_SKIPREASON", message);
        }