Skip to content

Commit 2a2e013

Browse files
committed
remove BOM from UTF-8 files
1 parent 8699211 commit 2a2e013

10 files changed

+36
-35
lines changed

examples/simple/PodList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace simple
1+
namespace simple
22
{
33
using System;
44
using System.IO;

examples/simple/simple.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
44
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="3.0.3" />

kubernetes-client.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26430.16

src/Exceptions/KubeConfigException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace k8s.Exceptions
1+
namespace k8s.Exceptions
22
{
33
using System;
44

src/Exceptions/KubernetesClientException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace k8s.Exceptions
1+
namespace k8s.Exceptions
22
{
33
using System;
44

src/Kubernetes.Auth.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace k8s
1+
namespace k8s
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
@@ -8,7 +8,7 @@
88
using System.Threading.Tasks;
99
using k8s.Exceptions;
1010
using Microsoft.Rest;
11-
11+
1212
public partial class Kubernetes : ServiceClient<Kubernetes>, IKubernetes
1313
{
1414
/// <summary>

src/KubernetesClientCredentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace k8s
1+
namespace k8s
22
{
33
using System;
44
using System.Globalization;

src/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace k8s
1+
namespace k8s
22
{
33
using k8s.Exceptions;
44
using System;

tests/KubernetesClientConfigurationTests.cs

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
using Xunit;
1+
using Xunit;
22
using System.IO;
33

44
namespace k8s.Tests
55
{
66
public class KubernetesClientConfigurationTests
77
{
88

9-
public static string readLine(string fileName) {
10-
StreamReader reader = new StreamReader(new FileStream(fileName, FileMode.Open, FileAccess.Read));
9+
public static string readLine(string fileName)
10+
{
11+
StreamReader reader = new StreamReader(new FileStream(fileName, FileMode.Open, FileAccess.Read));
1112
return reader.ReadLine();
1213
}
1314

@@ -63,7 +64,7 @@ public static string readLine(string fileName) {
6364
public void ConfigurationFileNotFound()
6465
{
6566
var fi = new FileInfo("/path/to/nowhere");
66-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
67+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
6768
}
6869

6970
/// <summary>
@@ -74,17 +75,17 @@ public void DefaultConfigurationLoaded()
7475
{
7576
var cfg = new KubernetesClientConfiguration(new FileInfo(kubeConfigFileName));
7677
Assert.NotNull(cfg.Host);
77-
}
78-
78+
}
79+
7980
/// <summary>
8081
/// Check if host is properly loaded, per context
8182
/// </summary>
8283
[Theory]
8384
[InlineData("federal-context", "https://horse.org:4443")]
8485
[InlineData("queen-anne-context", "https://pig.org:443")]
8586
public void ContextHostTest(string context, string host)
86-
{
87-
var fi = new FileInfo(kubeConfigFileName);
87+
{
88+
var fi = new FileInfo(kubeConfigFileName);
8889
var cfg = new KubernetesClientConfiguration(fi, context);
8990
Assert.Equal(host, cfg.Host);
9091
}
@@ -99,11 +100,11 @@ public void ContextHostTest(string context, string host)
99100
[InlineData("queen-anne-context", "black-token")]
100101
public void ContextUserTokenTest(string context, string token)
101102
{
102-
var fi = new FileInfo(kubeConfigFileName);
103-
var cfg = new KubernetesClientConfiguration(fi, context);
103+
var fi = new FileInfo(kubeConfigFileName);
104+
var cfg = new KubernetesClientConfiguration(fi, context);
104105
Assert.Equal(context, cfg.CurrentContext);
105106
Assert.Null(cfg.Username);
106-
Assert.Equal(token, cfg.AccessToken);
107+
Assert.Equal(token, cfg.AccessToken);
107108
}
108109

109110
/// <summary>
@@ -113,7 +114,7 @@ public void ContextUserTokenTest(string context, string token)
113114
/// <param name="clientCertData">'client-certificate-data' node content</param>
114115
/// <param name="clientCertKey">'client-key-data' content</param>
115116
[Theory]
116-
[InlineData("federal-context", "assets/client.crt" ,"assets/client.key")]
117+
[InlineData("federal-context", "assets/client.crt", "assets/client.key")]
117118
public void ContextCertificateTest(string context, string clientCert, string clientCertKey)
118119
{
119120
var fi = new FileInfo(kubeConfigFileName);
@@ -147,7 +148,7 @@ public void ClientDataTest(string context)
147148
public void ContextNotFoundTest()
148149
{
149150
var fi = new FileInfo(kubeConfigFileName);
150-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi, "context-not-found"));
151+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi, "context-not-found"));
151152
}
152153

153154
/// <summary>
@@ -157,8 +158,8 @@ public void ContextNotFoundTest()
157158
public void NoContexts()
158159
{
159160
var fi = new FileInfo(kubeConfigNoContexts);
160-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
161-
}
161+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
162+
}
162163

163164
/// <summary>
164165
/// Test if KubeConfigException is thrown when no Contexts are set and we specify a concrete context name
@@ -167,7 +168,7 @@ public void NoContexts()
167168
public void NoContextsExplicit()
168169
{
169170
var fi = new FileInfo(kubeConfigNoContexts);
170-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi, "context"));
171+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi, "context"));
171172
}
172173

173174
/// <summary>
@@ -189,7 +190,7 @@ public void UserPasswordAuthentication()
189190
public void IncompleteUserCredentials()
190191
{
191192
var fi = new FileInfo(kubeConfigNoCredentials);
192-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
193+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
193194
}
194195

195196
/// <summary>
@@ -199,7 +200,7 @@ public void IncompleteUserCredentials()
199200
public void ServerNotFound()
200201
{
201202
var fi = new FileInfo(kubeConfigNoServer);
202-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
203+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
203204
}
204205

205206
/// <summary>
@@ -209,17 +210,17 @@ public void ServerNotFound()
209210
public void ClusterNotFound()
210211
{
211212
var fi = new FileInfo(kubeConfigNoCluster);
212-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
213-
}
214-
213+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
214+
}
215+
215216
/// <summary>
216217
/// Checks that a KubeConfigException is thrown when the cluster defined in clusters and contexts do not match
217218
/// </summary>
218219
[Fact]
219220
public void ClusterNameMissmatch()
220221
{
221222
var fi = new FileInfo(kubeConfigClusterMissmatch);
222-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
223+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
223224
}
224225

225226
/// <summary>
@@ -229,7 +230,7 @@ public void ClusterNameMissmatch()
229230
public void CheckClusterTlsCorrectness()
230231
{
231232
var fi = new FileInfo(kubeConfigTlsNoSkipError);
232-
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
233+
Assert.Throws<k8s.Exceptions.KubeConfigException>(() => new KubernetesClientConfiguration(fi));
233234
}
234235

235236
/// <summary>
@@ -239,11 +240,11 @@ public void CheckClusterTlsCorrectness()
239240
public void CheckClusterTlsSkipCorrectness()
240241
{
241242
var fi = new FileInfo(kubeConfigTlsSkip);
242-
var cfg = new KubernetesClientConfiguration(fi);
243+
var cfg = new KubernetesClientConfiguration(fi);
243244
Assert.NotNull(cfg.Host);
244245
Assert.Null(cfg.SslCaCert);
245246
Assert.True(cfg.SkipTlsVerify);
246-
}
247+
}
247248

248249
// /// <summary>
249250
// /// Checks if the are pods

tests/tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)