Commit Graph

46 Commits

Author SHA1 Message Date
Shannon
48c4c235d2 fixing tests, updating nunit 2021-03-03 15:36:10 +11: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
Elitsa Marinovska
86cef94566 Re-implementing SurfaceControllerTests 2020-05-12 16:11:11 +02:00
Emma Garland
0c77450222 Specified hostingenvironment and databaseproviders after unit tests not picking up Umbraco.Core namespaces
Migrated into integrations project configurations, as files are being read
2020-04-14 16:55:54 +01:00
Shannon
60abdd60b5 Starts fixing up integration tests 2020-04-03 13:16:01 +11:00
Bjarke Berg
2a2903f932 AB#5820 - Review fixes / Clean up 2020-03-31 12:22:11 +02:00
Shannon
919d418920 Gets the DB installing in integration tests, changes integratino tests to use Generic Host builder 2020-03-24 11:53:56 +11:00
Shannon
41163c3c78 Gets CoreRuntime loading/booting in integration project 2020-03-13 14:43:41 +11:00
Shannon
da58b7a743 Adds integration test project for netcore3 and poc for crosswiring di container with msdi 2020-03-12 23:28:24 +11:00