Skip to content

Commit facd93a

Browse files
Run tests on all servers (#1191)
* Run tests on all servers. * Revert schema tests. * T * t * Text * Fix. * Add migration. * Update tests. * Test degrees * Update test * Update duration. * Improvements. * Add searchable text field. * Fix whitespaces.
1 parent 4fe545e commit facd93a

File tree

98 files changed

+6533
-570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+6533
-570
lines changed

backend/Squidex.sln

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.MongoDb", "src
5656
EndProject
5757
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.Tests", "tests\Squidex.Data.Tests\Squidex.Data.Tests.csproj", "{AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}"
5858
EndProject
59-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Data.EntityFramework", "src\Squidex.Data.EntityFramework\Squidex.Data.EntityFramework.csproj", "{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}"
59+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.EntityFramework", "src\Squidex.Data.EntityFramework\Squidex.Data.EntityFramework.csproj", "{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}"
60+
EndProject
61+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Data.Tests.CodeGenerator", "tests\Squidex.Data.Tests.CodeGenerator\Squidex.Data.Tests.CodeGenerator.csproj", "{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}"
6062
EndProject
6163
Global
6264
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -276,6 +278,18 @@ Global
276278
{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x64.Build.0 = Release|Any CPU
277279
{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x86.ActiveCfg = Release|Any CPU
278280
{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x86.Build.0 = Release|Any CPU
281+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
282+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|Any CPU.Build.0 = Debug|Any CPU
283+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x64.ActiveCfg = Debug|Any CPU
284+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x64.Build.0 = Debug|Any CPU
285+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x86.ActiveCfg = Debug|Any CPU
286+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x86.Build.0 = Debug|Any CPU
287+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|Any CPU.ActiveCfg = Release|Any CPU
288+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|Any CPU.Build.0 = Release|Any CPU
289+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x64.ActiveCfg = Release|Any CPU
290+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x64.Build.0 = Release|Any CPU
291+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x86.ActiveCfg = Release|Any CPU
292+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x86.Build.0 = Release|Any CPU
279293
EndGlobalSection
280294
GlobalSection(SolutionProperties) = preSolution
281295
HideSolutionNode = FALSE
@@ -299,6 +313,7 @@ Global
299313
{F754F05E-02FF-47B2-AB46-BB05C7E6B29D} = {3378B841-53F8-48CC-87C1-1B30CF912BFD}
300314
{AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD} = {3378B841-53F8-48CC-87C1-1B30CF912BFD}
301315
{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA} = {3378B841-53F8-48CC-87C1-1B30CF912BFD}
316+
{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328} = {3378B841-53F8-48CC-87C1-1B30CF912BFD}
302317
EndGlobalSection
303318
GlobalSection(ExtensibilityGlobals) = postSolution
304319
SolutionGuid = {02F2E872-3141-44F5-BD6A-33CD84E9FE08}

backend/src/Squidex.Data.EntityFramework/AppDbContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ protected override void OnModelCreating(ModelBuilder builder)
5252
builder.UseSettings(jsonSerializer, jsonColumnType);
5353
builder.UseTags(jsonSerializer, jsonColumnType);
5454
builder.UseTeams(jsonSerializer, jsonColumnType);
55+
builder.UseTextIndex();
5556
builder.UseUsage();
5657
builder.UseUsageTracking(jsonSerializer, jsonColumnType);
5758
builder.UseYDotNet();

backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/EFContentBuilder.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// ==========================================================================
77

88
using Squidex.Domain.Apps.Entities.Contents;
9-
using Squidex.Domain.Apps.Entities.Contents.Text.State;
109
using Squidex.Infrastructure;
1110
using Squidex.Infrastructure.Json;
1211

@@ -16,14 +15,6 @@ public static class EFContentBuilder
1615
{
1716
public static void UseContent(this ModelBuilder builder, IJsonSerializer jsonSerializer, string? jsonColumn)
1817
{
19-
builder.Entity<TextContentState>(b =>
20-
{
21-
b.ToTable("TextState");
22-
b.HasKey(x => x.UniqueContentId);
23-
b.Property(x => x.UniqueContentId).AsString();
24-
b.Property(x => x.State).AsString();
25-
});
26-
2718
builder.UseContentEntity<EFContentCompleteEntity>("ContentsAll", jsonSerializer, jsonColumn);
2819
builder.UseContentReference<EFReferenceCompleteEntity>("ContentReferencesAll");
2920

backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static SqlQueryBuilder WhereNotDeleted(this SqlQueryBuilder builder, Filt
3535
public static void LimitFields(this ContentData data, IReadOnlySet<string> fields)
3636
{
3737
List<string>? toDelete = null;
38-
foreach (var (key, value) in data)
38+
foreach (var (key, _) in data)
3939
{
4040
if (!fields.Any(x => IsMatch(key, x)))
4141
{
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// ==========================================================================
2+
// Squidex Headless CMS
3+
// ==========================================================================
4+
// Copyright (c) Squidex UG (haftungsbeschraenkt)
5+
// All rights reserved. Licensed under the MIT license.
6+
// ==========================================================================
7+
8+
using Squidex.Domain.Apps.Entities.Contents.Text;
9+
using Squidex.Domain.Apps.Entities.Contents.Text.State;
10+
using Squidex.Infrastructure;
11+
12+
namespace Microsoft.EntityFrameworkCore;
13+
14+
public static class EFTextBuilder
15+
{
16+
public static void UseTextIndex(this ModelBuilder builder)
17+
{
18+
builder.Entity<TextContentState>(b =>
19+
{
20+
b.ToTable("TextState");
21+
b.HasKey(x => x.UniqueContentId);
22+
b.Property(x => x.UniqueContentId).AsString();
23+
b.Property(x => x.State).AsString();
24+
});
25+
26+
builder.Entity<EFTextIndexTextEntity>(b =>
27+
{
28+
b.ToTable("Texts");
29+
b.Property(x => x.Id).HasMaxLength(400);
30+
b.Property(x => x.AppId).AsString();
31+
b.Property(x => x.SchemaId).AsString();
32+
b.Property(x => x.ContentId).AsString();
33+
});
34+
35+
builder.Entity<EFTextIndexGeoEntity>(b =>
36+
{
37+
b.ToTable("Geos");
38+
b.Property(x => x.Id).HasMaxLength(400);
39+
b.Property(x => x.AppId).AsString();
40+
b.Property(x => x.SchemaId).AsString();
41+
b.Property(x => x.ContentId).AsString();
42+
b.Property(x => x.GeoField).HasMaxLength(255);
43+
});
44+
}
45+
}

0 commit comments

Comments
 (0)