public void VerifyDefaultOptions() { // Verify that the [ClusterFixtureOptions] and [ClusterResetOptions] set the correct // property defaults. This doesn't actually do anything with the cluster. var fixtureOptions = new ClusterFixtureOptions(); Assert.NotNull(fixtureOptions.ResetOptions); Assert.False(fixtureOptions.Unredacted); Assert.False(fixtureOptions.RemoveClusterOnStart); Assert.False(fixtureOptions.RemoveClusterOnDispose); Assert.Null(fixtureOptions.TestOutputHelper); Assert.Null(fixtureOptions.ImageUriOrPath); Assert.Null(fixtureOptions.NeonCloudHeadendUri); Assert.True(fixtureOptions.CaptureDeploymentLogs); Assert.Equal(500, fixtureOptions.MaxParallel); var resetOptions = fixtureOptions.ResetOptions; Assert.True(resetOptions.ResetHarbor); Assert.True(resetOptions.ResetMinio); Assert.True(resetOptions.ResetCrio); Assert.True(resetOptions.ResetAuth); Assert.True(resetOptions.ResetMonitoring); Assert.Empty(resetOptions.KeepNamespaces); resetOptions = new ClusterResetOptions(); Assert.True(resetOptions.ResetHarbor); Assert.True(resetOptions.ResetMinio); Assert.True(resetOptions.ResetCrio); Assert.True(resetOptions.ResetAuth); Assert.True(resetOptions.ResetMonitoring); Assert.Empty(resetOptions.KeepNamespaces); }
public Test_KubeFixture(ClusterFixture fixture, ITestOutputHelper testOutputHelper) { this.fixture = fixture; var fixtureOptions = new ClusterFixtureOptions() { RemoveClusterOnStart = false, RemoveClusterOnDispose = false, ResetOptions = new ClusterResetOptions(), TestOutputHelper = testOutputHelper, Unredacted = true, }; var status = fixture.StartCluster(string.Empty); if (status == TestFixtureStatus.Disabled) { return; } else if (status == TestFixtureStatus.AlreadyRunning) { fixture.ResetCluster(); } }
public Test_KubeFixtureXenServer(ClusterFixture fixture, ITestOutputHelper testOutputHelper) { this.fixture = fixture; var options = new ClusterFixtureOptions() { TestOutputHelper = testOutputHelper }; var status = fixture.StartCluster(XenServerClusters.Tiny, options: options); if (status == TestFixtureStatus.Disabled) { return; } else if (status == TestFixtureStatus.AlreadyRunning) { fixture.ResetCluster(); } }
public Test_LeaderElector(ClusterFixture fixture, ITestOutputHelper testOutputHelper) { this.fixture = fixture; var options = new ClusterFixtureOptions(); //################################################################ // $debug(jefflill): Restore this after manual testing is complete //var status = fixture.StartWithNeonAssistant(options: options); //################################################################ var status = fixture.StartWithCurrentCluster(options: options); if (status == TestFixtureStatus.Disabled) { return; } else if (status == TestFixtureStatus.AlreadyRunning) { fixture.ResetCluster(); } }