Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
KULBIDA Pavel authored and KULBIDA Pavel committed Dec 29, 2023
1 parent 2cac9ea commit 242fc43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void Initializer_Callbacks_And_FileName_Initialized()

[TestCase(Kinds.ConfigMap)]
[TestCase(Kinds.Secret)]
[Explicit]
public void Build_Returns_ConfigurationProvider(int kind)
{
var builder = Mock.Of<IConfigurationBuilder>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using k8s;
using k8s.Models;
using Moq;
using ViennaNET.Extensions.Configuration.Kubernetes.Internals;

namespace ViennaNET.Extensions.Configuration.Kubernetes.Tests;

Expand Down Expand Up @@ -214,8 +213,13 @@ public void OnEvent_Extract_WithDefaultFileName_Returns_TestOption()
[Test]
public void Dispose_Throws_Nothing()
{
var k8sClient = Mock.Of<IKubernetes>();
var k8sClientBuilder = new Mock<IKubernetesClientBuilder>();

k8sClientBuilder.Setup(builder => builder.Build()).Returns(k8sClient);

var provider =
new SecretConfigurationProvider(new KubernetesConfigurationSource(), new KubernetesClientBuilder());
new SecretConfigurationProvider(new KubernetesConfigurationSource(), k8sClientBuilder.Object);

Assert.That(() => provider.Dispose(), Throws.Nothing);
}
Expand Down

0 comments on commit 242fc43

Please sign in to comment.