Commit Graph

29 Commits

Author SHA1 Message Date
Paul Johnson
0241649f7f Cleanup AddUmbraco & AddUmbracoCore 2020-11-21 15:22:24 +00:00
Paul Johnson
39657dea6d UmbracoBuilder now requires TypeLoader via ctor 2020-11-20 12:18:25 +00:00
Paul Johnson
8b97ce69b1 Removed CoreRuntimeBootstrapper
Establish runtime level at run time not during service registration.
2020-11-19 20:21:45 +00:00
Paul Johnson
3672a9f2f2 Add composers via extension on UmbracoBuilder
reduce scope of CoreRuntimeBootstrapper
2020-11-19 16:20:39 +00:00
Paul Johnson
48b61ec4c4 Simplify UmbracoBuilder setup 2020-11-19 09:12:39 +00:00
Paul Johnson
aec25d5007 Replace Composition with UmbracoBuilder 2020-11-18 17:41:57 +00:00
Bjarke Berg
e46a248832 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/6973-migrating-authenticationcontroller-merge
# Conflicts:
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Runtime/CoreInitialComposer.cs
#	src/Umbraco.Infrastructure/Scheduling/SchedulerComponent.cs
#	src/Umbraco.Infrastructure/Scheduling/SchedulerComposer.cs
#	src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs
#	src/Umbraco.Tests/Testing/UmbracoTestBase.cs
#	src/Umbraco.Web.BackOffice/Extensions/BackOfficeApplicationBuilderExtensions.cs
#	src/Umbraco.Web.BackOffice/Runtime/BackOfficeComposer.cs
#	src/Umbraco.Web.Common/Runtime/AspNetCoreComposer.cs
#	src/Umbraco.Web.Common/UmbracoContext/UmbracoContext.cs
#	src/Umbraco.Web.UI.NetCore/appsettings.json
#	src/Umbraco.Web/Editors/BackOfficeController.cs
#	src/Umbraco.Web/Runtime/WebInitialComponent.cs
2020-11-12 13:10:19 +01:00
Paul Johnson
3f5f85880e NetCore: MSDI refactor split CoreRuntime & Remove Current (#9356)
* Split Bootstrap code from CoreRuntime

* Make ContentService method signatures match interface
prevents need to hide the concrete class in tests

* Remove Current

Only bit that bugs me is TreeNode for IconFilePath
I get the feeling it's dead code, but can just use a setter in cs or work out path in js if required.

* Fix tests, remember to terminate IRuntime
2020-11-10 09:50:47 +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
Bjarke Berg
b47f946ffe Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/6973-migrating-authenticationcontroller
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	src/Umbraco.Infrastructure/HealthCheck/NotificationMethods/EmailNotificationMethod.cs
#	src/Umbraco.Web/Editors/AuthenticationController.cs
2020-10-26 14:34:06 +01:00
Paul Johnson
a99f625f6a Netcore: Alternate approach for MSDI refactor (#9247)
* Doesn't make much sense to have Concrete on IRegister, only on IFactory

* Handle FilesTreeController requires IFileSystem of type PhysicalFileSystem

* Handle registration of default MediaFileSystem without using RegisterUniqueFor

* Remove RegisterFor / RegisterUniqueFor from IRegister

* Switch over from LightInject to wrappers around MSDI

* Made mapper dependencies more explicit

* Remove registration for AngularJsonMediaTypeFormatter

It's dependencies aren't registered so container validation fails

* Resolve lifetime issue for EnsureValidSessionId by service locating

else resolve scoped in singleton

* Make registration more explicit for backoffice UserManager

* Make install step registrations more explicit

* Disable service provider validation so site can launch

Maybe this is a problem maybe not, we build about 8000 service providers so maybe everything is fine later...

* Further cleanup of IFactory interface

* Further cleanup of IRegister interface

* Revert "Make registration more explicit for backoffice UserManager"

This reverts commit 7215fe836103c597cd0873c66737a79b91ed4c49.

* Resolve issue where NewInstallStep would fail to reset password for "SuperUser"

Before MSDI, somehow BackOfficeIdentityOptions would be configured with token provider map from IdentityBuilder.AddDefaultTokenProviders.
After switchover those config actions are lost.

Subclass IdentityBuilder to ensure BackOfficeIdentityOptions doesn't miss config setup upstream.

* Initialize current.

* Add todo to turn container validation back on.

* Migrated ScopeFileSystemsTests to integration tests

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Resolve issue where MediaFileSystem was skipping ShadowFileSystem

* Attempt to fix ScopeFileSystemsTests on azure devops

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Be interesting to know what the actual full path is in pipeline.

* Clarify intent of CreateMediaTest

Doesn't help resolve weird UnauthorizedAccessException but it cuts so much cognitive overhead for the future.

* Use ILoggerfactory rather than mock for the manually constructed file PhysicalFileSystem

* Maybe resolve failing test on azure pipeline.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-26 11:47:14 +01:00
Shannon
d1b35deb43 Migrates remaining backofficecontroller but still a bunch of work to do , streamlines Backoffice to BackOffice (but is that what we want?) 2020-10-21 16:51:00 +11:00
Bjarke Berg
7b5012e00a Debug info for tests, to debug on Azure Devops
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-16 09:54:03 +02:00
Bjarke Berg
375a85903f Changed the UmbracoIntegrationTest setup to be sync, to avoid issue with AsyncLocal
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-05 10:02:11 +02:00
Bjarke Berg
3607dd14f1 Clean up + Removed old SignalR code
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-01 07:09:54 +02:00
Mole
cbdb96dfe6 Add SignalR in integration tests 2020-09-30 14:27:18 +02:00
Mole
3d52949938 Merge pull request #8944 from umbraco/netcore/bugfix/8856-user_culture_not_used_everywhere
Netcore: Bugfix for user culture not used everywhere
2020-09-23 09:58:30 +02:00
Bjarke Berg
4880b16512 Fix tests
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-09-22 19:59:01 +02:00
Bjarke Berg
96facc4d35 Netcore: Introduce BackofficeSecurityAccessor (#8871)
* Introduced IWebSecurityAccessor

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Fixed tests

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Renamed WebSecurity to BackofficeSecurity and all related names

* Fixes typos

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-09-22 10:01:00 +02:00
Shannon
7c78b5b34f Updates CoreRuntime with better dependencies so we can disable caches, fixes integration test to run multiple callbacks registered for TearDown, ensure we TearDown the runtime. 2020-09-04 00:27:43 +10:00
Shannon
a5772f10e1 comments 2020-09-02 18:21:51 +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
Bjarke Berg
a67629e9c0 Merge remote-tracking branch 'origin/netcore/feature/remaining-backoffice-controllers' into netcore/feature/fix-integration-tests 2020-07-07 13:25:58 +02:00
Bjarke Berg
7e90db5b30 Cleanup based on review
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-07-06 13:01:25 +02:00
Bjarke Berg
8400b53f70 Cleanup based on review
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-07-06 12:55:23 +02:00
Bjarke Berg
7b546e6cee Attempts to fix issue
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-30 20:11:39 +02:00
Bjarke Berg
27227043ba Added custom (hack) for PrefixlessBodyModelValidatorAttribute. 2020-06-18 14:40:30 +02:00
Bjarke Berg
3a33e7bf29 Migrated ControllerContentTests.. Right now the test fails, but the test is correct
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-17 16:39:28 +02:00