Skip to content

Commit

Permalink
Virtual Applications should be disabled by default in 7.11 #9720
Browse files Browse the repository at this point in the history
  • Loading branch information
rymsha committed Sep 22, 2022
1 parent 6aa3059 commit d5f7edd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

boolean auditlog_enabled() default true;

boolean virtual_enabled() default true;
boolean virtual_enabled() default false;

boolean virtual_schema_override() default true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void findVirtualApplication()
.hits( 1 )
.build() );

when( appConfig.auditlog_enabled() ).thenReturn( true );
when( appConfig.virtual_enabled() ).thenReturn( true );
when( appConfig.virtual_schema_override() ).thenReturn( false );

final ApplicationFactoryServiceImpl service = new ApplicationFactoryServiceImpl( bundleContext, nodeService, appConfig );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -238,6 +239,7 @@ public void initService()
BundleContext bundleContext = felix.getBundleContext();

AppConfig appConfig = mock( AppConfig.class, invocation -> invocation.getMethod().getDefaultValue() );
lenient().when( appConfig.virtual_enabled() ).thenReturn( true );

ApplicationFactoryServiceImpl applicationFactoryService =
new ApplicationFactoryServiceImpl( bundleContext, nodeService, appConfig );
Expand Down
2 changes: 1 addition & 1 deletion modules/runtime/src/home/config/com.enonic.xp.app.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

#auditlog.enabled = true

#virtual.enabled = true
#virtual.enabled = false
#virtual.schema.override = true

0 comments on commit d5f7edd

Please sign in to comment.