Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add System.Net references on net462 #30

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Qdrant.Client/CertificateValidation.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Net.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
Expand Down
3 changes: 3 additions & 0 deletions src/Qdrant.Client/Grpc/QdrantChannel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#if NETFRAMEWORK
using System.Net.Http;
#endif
using Grpc.Core;
using Grpc.Core.Interceptors;
using Grpc.Net.Client;
Expand Down
7 changes: 4 additions & 3 deletions tests/Qdrant.Client.Tests/ApiKeyCertificateThumbprintTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#if NETFRAMEWORK
using System.Net.Http;
using Grpc.Core.Interceptors;
using Grpc.Net.Client;
#else
using System.Security.Authentication;
#endif

using System.Security.Authentication;
using FluentAssertions;
using Grpc.Core;
using Qdrant.Client.Grpc;
Expand Down Expand Up @@ -84,8 +86,7 @@ public void ClientConfiguredWithoutApiKeyCannotConnect()

var exception = Assert.Throws<RpcException>(() => client.Qdrant.HealthCheck(new HealthCheckRequest()));
#if NETFRAMEWORK
// TODO: This sometimes fails with StatusCode.PermissionDenied, but no idea why
exception.Status.StatusCode.Should().Be(StatusCode.Unavailable);
exception.Status.StatusCode.Should().BeOneOf(StatusCode.Unavailable, StatusCode.PermissionDenied);
#else
exception.Status.StatusCode.Should().Be(StatusCode.PermissionDenied);
exception.Status.Detail.Should().Be("Invalid api-key");
Expand Down
9 changes: 5 additions & 4 deletions tests/Qdrant.Client.Tests/QdrantFixture.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using Qdrant.Client.Grpc;
using Qdrant.Client.Tests.Container;
using Xunit;

#if NETFRAMEWORK
using System.Net.Http;
using Grpc.Core.Interceptors;
using Grpc.Net.Client;
#endif

using Qdrant.Client.Grpc;
using Qdrant.Client.Tests.Container;
using Xunit;

namespace Qdrant.Client;

[CollectionDefinition("Qdrant")]
Expand Down