Commit Graph

57 Commits

Author SHA1 Message Date
Lars-Erik
053f1b2795 Moved the one remaining SqlCe dependant integration test into separate assembly. 2021-07-20 13:08:55 +02:00
Shannon
3d5d04550a fix broken migration abstraction, fixes restart after upgrade so the runtimestate is correct, fixes sql alter column migration to actually run if its nullable. 2021-06-24 13:35:57 -06:00
Bjarke Berg
1775b21591 Updated nuget dependencies 2021-06-22 15:41:24 +02:00
Shannon
a0cc6d904c Updates to latest Examine on nuget 2021-06-21 14:17:17 -06:00
Shannon Deminick
eb70bc313a Implements Examine/Lucene index syncing for use on Azure (#10386)
* Updates to latest examine, ensures indexes are unlocked on startup, adds more info to the diagnostics and allows for the new sync directory factory to work.

* Gets index syncing working correct and fixes reindexing to not overprocess indexes

* fix duplicate package ref

* rebuilds empty indexes and fixes config with enum

* missing file
2021-06-07 14:58:49 +02:00
Shannon
3c3c9a6a47 Merge remote-tracking branch 'origin/v8/contrib' into v9/dev
# Conflicts:
#	src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
#	src/Umbraco.Core/Sync/DatabaseServerMessengerOptions.cs
#	src/Umbraco.Core/Sync/ISyncBootStateAccessor.cs
#	src/Umbraco.Core/Sync/NonRuntimeLevelBootStateAccessor.cs
#	src/Umbraco.Core/Sync/SyncBootState.cs
#	src/Umbraco.Tests/PublishedContent/NuCacheChildrenTests.cs
#	src/Umbraco.Tests/PublishedContent/NuCacheTests.cs
#	src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
#	src/Umbraco.Tests/Services/ContentTypeServiceVariantsTests.cs
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/de.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/es.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml
#	src/Umbraco.Web/BatchedDatabaseServerMessenger.cs
#	src/Umbraco.Web/Compose/DatabaseServerRegistrarAndMessengerComponent.cs
#	src/Umbraco.Web/HealthCheck/Checks/Config/AbstractConfigCheck.cs
#	src/Umbraco.Web/HealthCheck/Checks/Config/NotificationEmailCheck.cs
#	src/Umbraco.Web/HealthCheck/HealthCheckAction.cs
#	src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs
#	src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
#	src/Umbraco.Web/Search/ExamineFinalComponent.cs
2021-06-04 10:59:52 -07:00
Bjarke Berg
025a7aca29 Updated nuget packages 2021-05-19 21:44:33 +02:00
Shannon Deminick
eba6373a12 Examine 2.0 integration (#10241)
* Init commit for examine 2.0 work, most old umb examine tests working, probably a lot that doesn't

* Gets Umbraco Examine tests passing and makes some sense out of them, fixes some underlying issues.

* Large refactor, remove TaskHelper, rename Notifications to be consistent, Gets all examine/lucene indexes building and startup ordered in the correct way, removes old files, creates new IUmbracoIndexingHandler for abstracting out all index operations for umbraco data, abstracts out IIndexRebuilder, Fixes Stack overflow with LiveModelsProvider and loading assemblies, ports some changes from v8 for startup handling with cold boots, refactors out LastSyncedFileManager

* fix up issues with rebuilding and management dashboard.

* removes old files, removes NetworkHelper, fixes LastSyncedFileManager implementation to ensure the machine name is used, fix up logging with cold boot state.

* Makes MainDom safer to use and makes PublishedSnapshotService lazily register with MainDom

* lazily acquire application id (fix unit tests)

* Fixes resource casing and missing test file

* Ensures caches when requiring internal services for PublishedSnapshotService, UseNuCache is a separate call, shouldn't be buried in AddWebComponents, was also causing issues in integration tests since nucache was being used for the Id2Key service.

* For UmbracoTestServerTestBase enable nucache services

* Fixing tests

* Fix another test

* Fixes tests, use TestHostingEnvironment, make Tests.Common use net5, remove old Lucene.Net.Contrib ref.

* Fixes up some review notes

* Fixes issue with doubly registering PublishedSnapshotService meanig there could be 2x instances of it

* Checks for parseexception when executing the query

* Use application root instead of duplicating functionality.

* Added Examine project to netcore only solution file

* Fixed casing issue with LazyLoad, that is not lowercase.

* uses cancellationToken instead of bool flag, fixes always reading lastId from the LastSyncedFileManager, fixes RecurringHostedServiceBase so that there isn't an overlapping thread for the same task type

* Fix tests

* remove legacy test project from solution file

* Fix test

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-05-18 10:31:38 +02:00
Shannon
d72c11821f Merge remote-tracking branch 'origin/netcore/dev' into netcore/bugfix/10196-ambient-scope
# Conflicts:
#	src/Umbraco.Core/HybridAccessorBase.cs
#	src/Umbraco.Core/Security/IBackOfficeSecurityFactory.cs
#	src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.Common/Security/BackofficeSecurityFactory.cs
2021-03-04 16:57:32 +11:00
Shannon
2d0389d53c Updates project dependencies to latest patch releases, removes Umbraco.Code from Umbraco.Web since it was causing conflicts for some reason - finally these conflict errors are gone. 2021-03-04 14:10:10 +11:00
Shannon
48c4c235d2 fixing tests, updating nunit 2021-03-03 15:36:10 +11:00
Bjarke Berg
1c50ece986 Use c#9 + namespace fix 2021-03-02 16:20:44 +01:00
Mole
bf41c2eeaa Netcore: Align namespaces (#9801)
* Rename Umbraco.Core namespace to Umbraco.Cms.Core

* Move extension methods in core project to Umbraco.Extensions

* Move extension methods in core project to Umbraco.Extensions

* Rename Umbraco.Examine namespace to Umbraco.Cms.Examine

* Move examine extensions to Umbraco.Extensions namespace

* Reflect changed namespaces in Builder and fix unit tests

* Adjust namespace in Umbraco.ModelsBuilder.Embedded

* Adjust namespace in Umbraco.Persistence.SqlCe

* Adjust namespace in Umbraco.PublishedCache.NuCache

* Align namespaces in Umbraco.Web.BackOffice

* Align namespaces in Umbraco.Web.Common

* Ensure that SqlCeSupport is still enabled after changing the namespace

* Align namespaces in Umbraco.Web.Website

* Align namespaces in Umbraco.Web.UI.NetCore

* Align namespaces in Umbraco.Tests.Common

* Align namespaces in Umbraco.Tests.UnitTests

* Align namespaces in Umbraco.Tests.Integration

* Fix errors caused by changed namespaces

* Fix integration tests

* Undo the Umbraco.Examine.Lucene namespace change

This breaks integration tests on linux, since the namespace wont exists there because it's only used on windows.

* Fix merge

* Fix Merge
2021-02-18 11:06:02 +01:00
Bjarke Berg
e38972abf0 Updated to net5.0 and updated most nuget packages. Also fixed the nuspec files. + Fix typo Persistance => Persistence. 2021-01-20 21:01:45 +01:00
Shannon
d1df6c4719 less allocations with AbsolutePathDecoded. removes more aspx checks, adds UmbracoRouteValueTransformerTests, adds interface for IRoutableDocumentFilter 2021-01-13 11:08:48 +11:00
Bjarke Berg
e66ccc536d Netcore: Migrate more tests (#9621)
* AB8828 - Migrated ShadowFileSystemTests.cs
Note that the underlying behavior of Directory.EnumerateFiles is changed when search pattern is "". "" is not handled like "*" in netcore.

* AB8828 - Migrated ScopeEventDispatcherTests.cs

* AB8828 - Migrated DistributedCacheBinderTests.cs

* AB8828 - Migrated SchemaValidationTest.cs

* AB8828 - Migrated LocksTests.cs

* AB8828 - Migrated SqlCeTableByTableTest.cs (and renamed to SqlServerTableByTableTest.cs)

* AB8828 - Created DatabaseBuilderTests

* AB8828 - Fix issues with file systems for linux
2021-01-11 09:04:05 +01:00
Bjarke Berg
0151c435f1 Netcore: Package support for media + media types (#9547)
* Add support for media when installing a package

* clean up

* Fix tests

* Add support for media when installing a package

* clean up

* Fix tests

* moved tests + test data

* Migrated package tests + resources

* Fix issue with media picker on package page, was empty after save.

* Added missing files

* Fix casing issue of resources

* Added test for media

* Fix tests for linux

* Fix test

* Fix issue with move media..

* Fix issue with adding files to packages

* Add MediaType permissions.

* Fix test

* Fix test

* Retry flaky tests, and added TODOs to fix those

* new attempt to fix test

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2020-12-16 22:26:47 +01:00
Paul Johnson
51f20119a2 Enable running integrations tests on Linux 2020-12-11 14:12:34 +00:00
Bjarke Berg
8c5daec967 Clean in tests + Moved logviewer tests from integration to unit tests, and minimized the test file, to speed up the tests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-28 09:41:23 +01:00
Bjarke Berg
4d260b036b Merge branch 'netcore/bugfix/azure-devops-tests' into netcore/netcore 2020-10-27 11:57:38 +01:00
Bjarke Berg
6c2ece0619 Remove build warnings
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-27 11:57:15 +01:00
Paul Johnson
ec66990e72 NetCore: MSDI refactor phase 2 (#9280)
* Moved adapters from Infra -> Core

* Allow Composition to accept a service collection instead of an IRegister

* Composition no longer takes IRegister as constructor arg

all tests passing

* Composition no longer implements IRegister

* Lose _uniques in Composition

* lose Composition OnCreatingFactory actions

* Clean up UmbracoCoreServiceCollectionExtensions & Composition

Less IFactory

* LightInject gone where TFW == netstandard2.0 || TFW == netcoreapp3.1

* Resolve dead code issues

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later.

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later (continued)

Thought the counts were low, it's mostly extension method usage
2020-10-27 11:53:01 +01:00
Bjarke Berg
a6ef907427 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/bugfix/azure-devops-tests 2020-10-26 16:26:59 +01:00
Andy Butland
6e592d6467 NetCore: Reorganised integration tests into project grouped folders and namespaces (#9208)
* Reorganised integration tests into folders and classes grouping by project.

* Updated namespaces and file locations from PR comments.

* Fix merge conflict

* Cleared content type service events looking to resolve failing integration test on build server.

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-10-20 18:43:03 +02:00
Mole
e5a20aea6f Remove duplicate PackageReference 2020-10-20 09:10:16 +02:00
Mole
e87caac0dd Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/move-tests
# Conflicts:
#	src/Umbraco.Tests.Common/TestHelpers/MockedValueEditors.cs
#	src/Umbraco.Tests.Common/TestHelpers/StringNewlineExtensions.cs
#	src/Umbraco.Tests.UnitTests/TestHelpers/TestHelper.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/ObjectExtensionsTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Core/Manifest/ManifestContentAppTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Core/Manifest/ManifestParserTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Macros/MacroParserTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Manifest/ManifestContentAppTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Manifest/ManifestParserTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Macros/MacroParserTests.cs
#	src/Umbraco.Tests/Macros/MacroParserTests.cs
#	src/Umbraco.Tests/Manifest/ManifestContentAppTests.cs
#	src/Umbraco.Tests/Manifest/ManifestParserTests.cs
#	src/Umbraco.Web.UI.NetCore/umbraco/UmbracoBackOffice/Default.cshtml
2020-10-20 08:40:41 +02:00
Bjarke Berg
c72cd2914b Debug info for tests, to debug on Azure Devops
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-16 10:45:22 +02:00
Andy Butland
874e585bfb Migrated EntityXmlSerializerTests. Also aligned namespaces and update LocalizationServiceTests to use test model builders. 2020-10-10 18:25:18 +02:00
Bjarke Berg
c7cdfaa775 Update nuget packages
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-08 14:49:24 +02:00
Mole
7a8a7104c7 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
# Conflicts:
#	src/Umbraco.Tests.UnitTests/Umbraco.Core/Manifest/ManifestParserTests.cs
#	src/Umbraco.Tests/IO/ShadowFileSystemTests.cs
2020-10-06 08:13:29 +02:00
Bjarke Berg
4dc26a9f04 Fix double nuget reference
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-05 07:45:28 +02:00
Bjarke Berg
35443f0e71 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	src/Umbraco.Infrastructure/Search/ExamineComponent.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
2020-09-24 08:24:35 +02:00
Mole
0e737c0903 Use a SiriLogger that logs to console in UmbracoIntegrationTest
AFAIK ConsoleLoggerFactory gets disposed when host is disposed causing all tests but the ones from the first test fixture to fail. As far as I'm aware it's not possible to make it not dispose ConsoleLoggerFactory, however it is possible with Sirilog
2020-09-23 15:37:19 +02:00
Bjarke Berg
0d731e7a40 Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	build/build-bootstrap.ps1
#	src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs
#	src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs
#	src/Umbraco.Infrastructure/Search/ExamineComponent.cs
#	src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
#	src/Umbraco.Web/Compose/BackOfficeUserAuditEventsComponent.cs
#	src/Umbraco.Web/Logging/WebProfilerComponent.cs
2020-09-23 13:28:36 +02:00
Bjarke Berg
81f670f10a Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/AB8239-nuget-updates 2020-09-18 08:24:29 +02:00
Elitsa Marinovska
0f9595a5b1 Updates nuget packages versions to latest 2020-09-17 17:58:11 +02:00
Bjarke Berg
b4353585c3 Simplifyed the ConnectionStrings config 2020-09-15 09:11:36 +02:00
Bjarke Berg
acb46119be More clean up of old configs 2020-09-14 12:57:47 +02:00
Shannon
27586d9f19 removes proj ref that wasn't needed 2020-09-02 18:19:27 +10:00
Shannon
f84a93ae20 Adds IUmbracoBuilder to build the config so it's easier to split apart, ensures background tasks don't run in integration tests, uses a custom CoreRuntime to ensure we use SimpleMainDom, re-wires the UmbracoWebApplicationFactory so that duplicate Hosts are not running at the same time, fixes issues with overriding/shadowing, uses RAMDirectory in lucene for tests, fixes CoreRuntime's events that we're moved incorrectly and not backwards compat, adds new real non static events which we can use in integration tests to install the DB before the runtime state is calculated 2020-09-02 18:10:29 +10:00
Bjarke Berg
edd457c24b Force Examine to run in sync for integration tests 2020-08-31 11:31:56 +02:00
Nikolaj
577a9ae365 Remove remove tag and change json file to content 2020-08-17 15:55:30 +02:00
Nikolaj
7a2f1d7564 Revert "Remove unused test log "
This reverts commit 19b71a191f.
2020-08-17 14:16:14 +02:00
Nikolaj
19b71a191f Remove unused test log 2020-08-17 14:03:07 +02:00
Nikolaj
6b41b1dd8c Move logviewer tests 2020-08-12 10:26:14 +02:00
Bjarke Berg
aac8cd5423 Clean up + migrated AuditServiceTests 2020-07-01 17:42:39 +02:00
Bjarke Berg
0714fc4734 Migrated some of the UserControllerTests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-22 14:11:01 +02:00
Bjarke Berg
989c83b452 Merge remote-tracking branch 'origin/netcore/feature/migrate-remaining-trees' into netcore/feature/contentcontroller_and_related 2020-06-12 10:03:37 +02:00
Bjarke Berg
609c1ffc5b Migrated content controller + related
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-12 08:27:22 +02:00
Bjarke Berg
835b04273f Migrated remaining *TreeController's
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-10 19:22:25 +02:00