Skip to content

Commit 2d1cde4

Browse files
committed
Re-add minimal Tests project
1 parent 6856992 commit 2d1cde4

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

Elasticsearch.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ EndProject
1111
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground", "src\Playground\Playground.csproj", "{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}"
1212
EndProject
1313
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{362B2776-4B29-46AB-B237-56776B5372B6}"
14+
ProjectSection(SolutionItems) = preProject
15+
tests\Directory.Build.props = tests\Directory.Build.props
16+
EndProjectSection
1417
EndProject
1518
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Core", "tests\Tests.Core\Tests.Core.csproj", "{70225C3F-393A-40F5-A778-8FF71A38C4C0}"
1619
EndProject
@@ -58,6 +61,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsear
5861
EndProject
5962
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.Serverless", "src\Elastic.Clients.Elasticsearch.Serverless\Elastic.Clients.Elasticsearch.Serverless.csproj", "{49D7F5A7-AA32-492B-B957-0E3325861F55}"
6063
EndProject
64+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests\Tests.csproj", "{6FD804B2-CE80-41CB-A411-2023F34C18FE}"
65+
EndProject
6166
Global
6267
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6368
Debug|Any CPU = Debug|Any CPU
@@ -112,6 +117,10 @@ Global
112117
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Debug|Any CPU.Build.0 = Debug|Any CPU
113118
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.ActiveCfg = Release|Any CPU
114119
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.Build.0 = Release|Any CPU
120+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
121+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
122+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
123+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.Build.0 = Release|Any CPU
115124
EndGlobalSection
116125
GlobalSection(SolutionProperties) = preSolution
117126
HideSolutionNode = FALSE
@@ -129,6 +138,7 @@ Global
129138
{F6162603-D134-4121-8106-2BA4DAD7350B} = {362B2776-4B29-46AB-B237-56776B5372B6}
130139
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
131140
{49D7F5A7-AA32-492B-B957-0E3325861F55} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
141+
{6FD804B2-CE80-41CB-A411-2023F34C18FE} = {362B2776-4B29-46AB-B237-56776B5372B6}
132142
EndGlobalSection
133143
GlobalSection(ExtensibilityGlobals) = postSolution
134144
SolutionGuid = {CE74F821-B001-4C69-A58D-CF81F8B0B632}

build/scripts/Paths.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ module Paths =
1717
let Output(folder) = sprintf "%s/%s" BuildOutput folder
1818

1919
let InplaceBuildOutput project tfm =
20-
sprintf "src/%s/bin/Release/%s" project tfm
20+
//sprintf "src/%s/bin/Release/%s" project tfm
21+
sprintf ".artifacts/bin/%s/release_%s" project tfm
2122
let InplaceBuildTestOutput project tfm =
22-
sprintf "tests/%s/bin/Release/%s" project tfm
23+
sprintf "artifacts/bin/%s/release_%s" project tfm
2324
let MagicDocumentationFile =
2425
"src/Elasticsearch.Net/obj/Release/netstandard2.1/Elasticsearch.Net.csprojAssemblyReference.cache"
2526

tests/Directory.Build.props

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,4 @@
44
<!-- CAC001: We dont want to set ConfigureAwait() in tests, assume who evers calling our lib doesn't do this either.-->
55
<NoWarn>CAC001</NoWarn>
66
</PropertyGroup>
7-
<PropertyGroup Condition="'$(TestPackageVersion)'!=''">
8-
<RestoreSources>$(SolutionRoot)/build/output;https://api.nuget.org/v3/index.json</RestoreSources>
9-
</PropertyGroup>
107
</Project>

tests/Tests/Aggregations/Metric/GeoCentroidAggregationUsageTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Tests.Domain;
99
using Tests.Core.Extensions;
1010
using Tests.Framework.EndpointTests.TestState;
11-
using Elastic.Clients.Elasticsearch.Experimental;
1211
using Elastic.Clients.Elasticsearch.QueryDsl;
1312

1413
namespace Tests.Aggregations.Metric;

tests/Tests/ClientConcepts/OpenTelemetry/OpenTelemetryTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
using System.Diagnostics;
66
using System.Threading.Tasks;
7+
using Elastic.Elasticsearch.Xunit.XunitPlumbing;
8+
using FluentAssertions;
79
using Tests.Core.Client;
810
using Tests.Domain;
911
using Xunit;
@@ -36,7 +38,7 @@ public async Task BasicOpenTelemetryTest()
3638

3739
VerifyActivity(oTelActivity, "ping");
3840

39-
await client.SearchAsync<Project>(s => s.Index("test").Query(q => q.MatchAll()));
41+
await client.SearchAsync<Project>(s => s.Index("test").Query(q => q.MatchAll(m => { })));
4042

4143
VerifyActivity(oTelActivity, "search", "http://localhost:9200/test/_search?pretty=true&error_trace=true");
4244

tests/Tests/QueryDsl/BoolDsl/OperatorUsageBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected static void ReturnsBool(Query combined, Action<BoolQuery> boolQueryAss
2525
boolQueryAssert(boolQuery);
2626
}
2727

28-
protected static void ReturnsSingleQuery<T>(Query combined, Action<T> queryAssert) where T : SearchQuery
28+
protected static void ReturnsSingleQuery<T>(Query combined, Action<T> queryAssert) where T : Query
2929
{
3030
combined.Should().NotBeNull();
3131
combined.TryGet<T>(out var query).Should().BeTrue();

tests/Tests/Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@
3333
<ItemGroup>
3434
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
3535
</ItemGroup>
36+
<ItemGroup>
37+
<!-- TODO ADD THESE BACK -->
38+
<Compile Remove="**" />
39+
<Compile Include="ClientConcepts\OpenTelemetry\OpenTelemetryTests.cs" />
40+
</ItemGroup>
3641
</Project>

0 commit comments

Comments
 (0)