Fix merge issues
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
|
||||
<ItemGroup>
|
||||
<!-- Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer brings in a vulnerable version of Azure.Identity -->
|
||||
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
|
||||
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
|
||||
<!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
|
||||
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
|
||||
@@ -90,6 +91,7 @@
|
||||
<!-- Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc brings in a vulnerable version of System.Text.RegularExpressions -->
|
||||
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
|
||||
<!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
|
||||
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
|
||||
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" />
|
||||
<!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore depends on a vulnerable version -->
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
|
||||
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/>
|
||||
|
||||
<!-- Take top-level depedendency on OpenIddict.AspNetCore depends on a vulnerable version -->
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
|
||||
<PackageReference Include="Azure.Identity" />
|
||||
|
||||
<!-- Take top-level depedendency on Microsoft.Extensions.Caching.Memory, because Microsoft.EntityFrameworkCore.* depends on a vulnerable version -->
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<Title>Umbraco CMS - Persistence - SQL Server</Title>
|
||||
<Description>Adds support for SQL Server to Umbraco CMS.</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
TODO: Fix and remove overrides:
|
||||
@@ -21,18 +21,16 @@
|
||||
-->
|
||||
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1405,SA1121,SA1117,IDE1006,CS0618,IDE0270,IDE0057,IDE0054,CSO618,IDE0048,CS1574</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NPoco.SqlServer" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Take top-level depedendency on Azure.Identity, because NPoco.SqlServer depends on a vulnerable version -->
|
||||
<PackageReference Include="Azure.Identity" />
|
||||
<!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
|
||||
<PackageReference Include="System.Runtime.Caching" />
|
||||
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
|
||||
<!-- Take top-level depedendency on System.Text.Encodings.Web, because Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders depends on a vulnerable version -->
|
||||
<PackageReference Include="System.Text.Encodings.Web" />
|
||||
<!-- Take top-level depedendency on Microsoft.Data.SqlClient, because NPoco.SqlServer depends on a vulnerable version -->
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
using Umbraco.Cms.Core.Models.PublishedContent;
|
||||
using Umbraco.Cms.Core.PublishedCache;
|
||||
using Umbraco.Cms.Infrastructure.PublishedCache;
|
||||
using Umbraco.Cms.Infrastructure.PublishedCache.DataSource;
|
||||
using Umbraco.Cms.Tests.Common.Builders;
|
||||
using Umbraco.Cms.Tests.Common.Builders.Extensions;
|
||||
using Umbraco.Cms.Tests.Common.Testing;
|
||||
using Umbraco.Cms.Tests.Integration.Testing;
|
||||
|
||||
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.PublishedCache;
|
||||
|
||||
[TestFixture]
|
||||
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
|
||||
public class ContentCacheTests : UmbracoIntegrationTestWithContent
|
||||
{
|
||||
private ContentStore GetContentStore()
|
||||
{
|
||||
var path = Path.Combine(GetRequiredService<IHostingEnvironment>().LocalTempPath, "NuCache");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var localContentDbPath = Path.Combine(path, "NuCache.Content.db");
|
||||
var localContentDbExists = File.Exists(localContentDbPath);
|
||||
var contentDataSerializer = new ContentDataSerializer(new DictionaryOfPropertyDataSerializer());
|
||||
var localContentDb = BTree.GetTree(localContentDbPath, localContentDbExists, new NuCacheSettings(), contentDataSerializer);
|
||||
|
||||
return new ContentStore(
|
||||
GetRequiredService<IPublishedSnapshotAccessor>(),
|
||||
GetRequiredService<IVariationContextAccessor>(),
|
||||
LoggerFactory.CreateLogger<ContentCacheTests>(),
|
||||
LoggerFactory,
|
||||
GetRequiredService<IPublishedModelFactory>(), // new NoopPublishedModelFactory
|
||||
localContentDb);
|
||||
}
|
||||
|
||||
private ContentNodeKit CreateContentNodeKit()
|
||||
{
|
||||
var contentData = new ContentDataBuilder()
|
||||
.WithName("Content 1")
|
||||
.WithProperties(new PropertyDataBuilder()
|
||||
.WithPropertyData("welcomeText", "Welcome")
|
||||
.WithPropertyData("welcomeText", "Welcome", "en-US")
|
||||
.WithPropertyData("welcomeText", "Willkommen", "de")
|
||||
.WithPropertyData("welcomeText", "Welkom", "nl")
|
||||
.WithPropertyData("welcomeText2", "Welcome")
|
||||
.WithPropertyData("welcomeText2", "Welcome", "en-US")
|
||||
.WithPropertyData("noprop", "xxx")
|
||||
.Build())
|
||||
.Build();
|
||||
|
||||
return ContentNodeKitBuilder.CreateWithContent(
|
||||
ContentType.Id,
|
||||
1,
|
||||
"-1,1",
|
||||
draftData: contentData,
|
||||
publishedData: contentData);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task SetLocked()
|
||||
{
|
||||
var contentStore = GetContentStore();
|
||||
|
||||
using (contentStore.GetScopedWriteLock(ScopeProvider))
|
||||
{
|
||||
var contentNodeKit = CreateContentNodeKit();
|
||||
|
||||
contentStore.SetLocked(contentNodeKit);
|
||||
|
||||
// Try running the same operation again in an async task
|
||||
await Task.Run(() => contentStore.SetLocked(contentNodeKit));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user