Skip to content

Commit

Permalink
test: skip the flakey tests for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
buehler committed Oct 16, 2023
1 parent ba957c3 commit 881111b
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 27 deletions.
2 changes: 0 additions & 2 deletions examples/Operator/Controller/V1TestEntityController.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using KubeOps.Abstractions.Controller;
using KubeOps.Abstractions.Events;
using KubeOps.Abstractions.Finalizer;
using KubeOps.Abstractions.Queue;
using KubeOps.Abstractions.Rbac;
using KubeOps.KubernetesClient;

using Microsoft.Extensions.Logging;

using Operator.Entities;
using Operator.Finalizer;

namespace Operator.Controller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Text.Json.Serialization;

using k8s;
using k8s;

namespace KubeOps.Abstractions.Entities;

Expand Down
4 changes: 0 additions & 4 deletions src/KubeOps.Cli/Commands/Generator/DockerGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System.CommandLine;
using System.CommandLine.Invocation;

using k8s;
using k8s.Models;

using KubeOps.Abstractions.Kustomize;
using KubeOps.Cli.Output;

using Spectre.Console;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using KubeOps.Cli.Certificates;
using KubeOps.Cli.Output;
using KubeOps.Cli.Transpilation;
using KubeOps.Transpiler;

using Spectre.Console;

Expand Down
2 changes: 0 additions & 2 deletions src/KubeOps.Generator/Generators/OperatorBuilderGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Text;

using KubeOps.Generator.SyntaxReceiver;

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using k8s.Models;

using KubeOps.Abstractions.Builder;
using KubeOps.KubernetesClient;
using KubeOps.Operator.Queue;

using Microsoft.Extensions.Logging;
Expand Down
1 change: 0 additions & 1 deletion test/KubeOps.Operator.Test/Builder/OperatorBuilder.Test.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using FluentAssertions;

using k8s.LeaderElection;
using k8s.Models;

using KubeOps.Abstractions.Builder;
Expand Down
2 changes: 0 additions & 2 deletions test/KubeOps.Operator.Web.Test/IntegrationTestCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Routing;
using Microsoft.Build.Locator;
using Microsoft.CodeAnalysis.MSBuild;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace KubeOps.Operator.Web.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
using k8s.Models;

using KubeOps.Operator.Client;
using KubeOps.Operator.Web.Test.TestApp;

namespace KubeOps.Operator.Web.Test.LocalTunnel;

public class DevelopmentTunnelServiceTest : IntegrationTestBase
{
// public DevelopmentTunnelServiceTest(TestApplicationFactory factory) : base(factory)
// {
// }

[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Install_Validation_Webhooks()
{
using var client = KubernetesClientFactory.Create<V1ValidatingWebhookConfiguration>();
Expand All @@ -24,7 +19,7 @@ public async Task Should_Install_Validation_Webhooks()
validators.Webhooks[0].ClientConfig.Url.Should().Contain("/validate/v1operatorwebintegrationtestentity");
}

[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Install_Mutation_Webhooks()
{
using var client = KubernetesClientFactory.Create<V1MutatingWebhookConfiguration>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace KubeOps.Operator.Web.Test.Webhooks;

public class MutationWebhookIntegrationTest : IntegrationTestBase
{
[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Allow_Creation_Of_Entity()
{
using var client = KubernetesClientFactory.Create<V1OperatorWebIntegrationTestEntity>();
Expand All @@ -16,7 +16,7 @@ public async Task Should_Allow_Creation_Of_Entity()
await client.DeleteAsync(e);
}

[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Mutate_Entity_According_To_Code()
{
using var client = KubernetesClientFactory.Create<V1OperatorWebIntegrationTestEntity>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace KubeOps.Operator.Web.Test.Webhooks;

public class ValidationWebhookIntegrationTest : IntegrationTestBase
{
[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Allow_Creation_Of_Entity()
{
using var client = KubernetesClientFactory.Create<V1OperatorWebIntegrationTestEntity>();
var e = await client.CreateAsync(new V1OperatorWebIntegrationTestEntity("test-entity", "foobar"));
await client.DeleteAsync(e);
}

[Fact]
[Fact(Skip = "This test is flakey since localtunnel is not always available. Need an alternative.")]
public async Task Should_Disallow_Creation_When_Validation_Fails()
{
using var client = KubernetesClientFactory.Create<V1OperatorWebIntegrationTestEntity>();
Expand Down

0 comments on commit 881111b

Please sign in to comment.