generate base on 1.34 (#1654)
* Implement code changes to enhance functionality and improve performance * chore: update version to 18.0 in version.json * fix: correct initialization of opblackList in PluralHelper * chore: update SDK version to 18.0 in README.md * Fixdocfx (#82) * fix: update file references and clean up validation comments in models * chore: add symlink to CONTRIBUTING.md for easier access * fix: update documentation to include full type names for WebSocket and Predicate * fix: include CONTRIBUTING.md in docfx.json build content * refactor: update IKubernetes interface and template for consistency * feat: add Microsoft.CodeAnalysis.CSharp package and improve source normalization in generator context * chore: update package versions in Directory.Packages.props for compatibility and improvements * chore: update Microsoft.VisualStudio.SlnGen and Nerdbank.GitVersioning package versions for compatibility * Implement code changes to enhance functionality and improve performance * chore: update version to 18.0 in version.json * fix: correct initialization of opblackList in PluralHelper * chore: update SDK version to 18.0 in README.md * refactor: update IKubernetes interface and template for consistency * feat: add Microsoft.CodeAnalysis.CSharp package and improve source normalization in generator context * chore: update package versions in Directory.Packages.props for compatibility and improvements * chore: update Microsoft.VisualStudio.SlnGen and Nerdbank.GitVersioning package versions for compatibility * chore: downgrade xunit.runner.visualstudio and Xunit.StaFact package versions for compatibility * chore: update package versions in Directory.Packages.props for compatibility and improvements * style: format code for consistency and readability * feat: update certificate loading logic for .NET 9 compatibility * fix: update certificate loading method for .NET 9 compatibility
This commit is contained in:
@@ -370,7 +370,7 @@ namespace k8s.E2E
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[MinikubeFact]
|
||||
public async Task VersionTestAsync()
|
||||
{
|
||||
|
||||
@@ -188,10 +188,18 @@ namespace k8s.Tests
|
||||
}
|
||||
else
|
||||
{
|
||||
#if NET9_0_OR_GREATER
|
||||
serverCertificate = X509CertificateLoader.LoadPkcs12(Convert.FromBase64String(serverCertificateData), "");
|
||||
#else
|
||||
serverCertificate = new X509Certificate2(Convert.FromBase64String(serverCertificateData), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NET9_0_OR_GREATER
|
||||
var clientCertificate = X509CertificateLoader.LoadCertificate(Convert.FromBase64String(clientCertificateData));
|
||||
#else
|
||||
var clientCertificate = new X509Certificate2(Convert.FromBase64String(clientCertificateData), "");
|
||||
#endif
|
||||
|
||||
var clientCertificateValidationCalled = false;
|
||||
|
||||
@@ -294,10 +302,18 @@ namespace k8s.Tests
|
||||
}
|
||||
else
|
||||
{
|
||||
#if NET9_0_OR_GREATER
|
||||
serverCertificate = X509CertificateLoader.LoadPkcs12(serverCertificateData, "");
|
||||
#else
|
||||
serverCertificate = new X509Certificate2(serverCertificateData, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NET9_0_OR_GREATER
|
||||
var clientCertificate = X509CertificateLoader.LoadCertificate(clientCertificateData);
|
||||
#else
|
||||
var clientCertificate = new X509Certificate2(clientCertificateData, "");
|
||||
#endif
|
||||
|
||||
var clientCertificateValidationCalled = false;
|
||||
|
||||
|
||||
@@ -85,8 +85,13 @@ namespace k8s.Tests
|
||||
{
|
||||
var certCollection = CertUtils.LoadPemFileCert("assets/ca-bundle.crt");
|
||||
|
||||
#if NET9_0_OR_GREATER
|
||||
using var intermediateCert = X509CertificateLoader.LoadCertificateFromFile("assets/ca-bundle-intermediate.crt");
|
||||
using var rootCert = X509CertificateLoader.LoadCertificateFromFile("assets/ca-bundle-root.crt");
|
||||
#else
|
||||
using var intermediateCert = new X509Certificate2("assets/ca-bundle-intermediate.crt");
|
||||
using var rootCert = new X509Certificate2("assets/ca-bundle-root.crt");
|
||||
#endif
|
||||
|
||||
Assert.Equal(2, certCollection.Count);
|
||||
|
||||
|
||||
@@ -68,7 +68,11 @@ namespace k8s.Tests
|
||||
public void ValidCert()
|
||||
{
|
||||
var caCert = CertUtils.LoadPemFileCert("assets/ca.crt");
|
||||
#if NET9_0_OR_GREATER
|
||||
var testCert = X509CertificateLoader.LoadCertificateFromFile("assets/ca.crt");
|
||||
#else
|
||||
var testCert = new X509Certificate2("assets/ca.crt");
|
||||
#endif
|
||||
var chain = new X509Chain();
|
||||
var errors = SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
|
||||
@@ -81,7 +85,11 @@ namespace k8s.Tests
|
||||
public void InvalidCert()
|
||||
{
|
||||
var caCert = CertUtils.LoadPemFileCert("assets/ca.crt");
|
||||
#if NET9_0_OR_GREATER
|
||||
var testCert = X509CertificateLoader.LoadCertificateFromFile("assets/ca2.crt");
|
||||
#else
|
||||
var testCert = new X509Certificate2("assets/ca2.crt");
|
||||
#endif
|
||||
var chain = new X509Chain();
|
||||
var errors = SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
|
||||
@@ -110,7 +118,11 @@ namespace k8s.Tests
|
||||
public void InvalidBundleCert()
|
||||
{
|
||||
var caCert = CertUtils.LoadPemFileCert("assets/ca-bundle.crt");
|
||||
#if NET9_0_OR_GREATER
|
||||
var testCert = X509CertificateLoader.LoadCertificateFromFile("assets/ca2.crt");
|
||||
#else
|
||||
var testCert = new X509Certificate2("assets/ca2.crt");
|
||||
#endif
|
||||
var chain = new X509Chain();
|
||||
var errors = SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user