Added the file not found test

This commit is contained in:
Sergio Sisternes
2017-06-27 19:48:26 +02:00
parent f7ac5b728b
commit 052f597d34

View File

@@ -23,6 +23,16 @@ namespace k8s.Tests
/// </summary>
private static readonly string kubeConfigUserPassword = "assets/kubeconfig.user-pass.yml";
/// <summary>
/// The configuration file is not present. An KubeConfigException should be thrown
/// </summary>
[Fact]
public void ConfigurationFileNotFound()
{
var fi = new FileInfo("/path/to/nowhere");
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
}
/// <summary>
/// Checks Host is loaded from the default configuration file
/// </summary>