andi-huber commented on a change in pull request #274: URL: https://github.com/apache/isis/pull/274#discussion_r521174107
########## File path: regressiontests/stable/src/main/java/org/apache/isis/testdomain/conf/Configuration_headlessButSecure.java ########## @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.isis.testdomain.conf; + +import javax.inject.Inject; +import javax.inject.Provider; +import javax.inject.Singleton; + +import lombok.RequiredArgsConstructor; +import lombok.val; +import org.apache.isis.applib.annotation.OrderPrecedence; +import org.apache.isis.applib.services.command.Command; +import org.apache.isis.applib.services.iactn.Interaction; +import org.apache.isis.applib.services.iactn.InteractionContext; +import org.apache.isis.applib.services.metrics.MetricsService; +import org.apache.isis.commons.internal.debug._Probe; +import org.apache.isis.core.metamodel.services.command.CommandServiceInternal; +import org.apache.isis.core.runtime.events.iactn.IsisInteractionLifecycleEvent; +import org.apache.isis.extensions.cors.impl.IsisModuleExtCorsImpl; +import org.apache.isis.extensions.modelannotation.metamodel.IsisModuleExtModelAnnotation; +import org.apache.isis.security.bypass.IsisModuleSecurityBypass; +import org.springframework.context.annotation.*; + +import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices; +import org.apache.isis.extensions.secman.api.SecurityModuleConfig; +import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationService; +import org.apache.isis.extensions.secman.api.permission.PermissionsEvaluationServiceAllowBeatsVeto; +import org.apache.isis.testdomain.util.kv.KVStoreForTesting; +import org.springframework.context.event.EventListener; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionException; +import org.springframework.transaction.TransactionStatus; + +import java.util.Optional; + +@Configuration +@Import({ + IsisModuleCoreRuntimeServices.class, + //IsisModuleCoreSecurity.class, + IsisModuleSecurityBypass.class, + IsisModuleExtModelAnnotation.class, // @Model support + IsisModuleExtCorsImpl.class, + Configuration_headlessButSecure.HeadlessCommandSupport.class, + KVStoreForTesting.class, // Helper for JUnit Tests +}) +public class Configuration_headlessButSecure { Review comment: Do we need to introduce this code duplication here with respect to the existing `Configuration_headless` class? If something is preventing us from reusing `Configuration_headless`, I'd rather see `Configuration_headless` changed/fixed such that we can avoid code duplication. (This might sound picky, but its easy to add lines of code, and hard to get rid of lines of code.) ########## File path: extensions/vro/cors/impl/pom.xml ########## @@ -46,6 +46,31 @@ <artifactId>spring-web</artifactId> </dependency> + <!-- TESTS --> + <dependency> + <groupId>org.apache.isis.core</groupId> + <artifactId>isis-core-internaltestsupport</artifactId> + <scope>test</scope> + <!-- provided by Spring Boot --> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.tomcat.embed</groupId> + <artifactId>tomcat-embed-core</artifactId> + <version>9.0.37</version> + <scope>test</scope> + </dependency> + Review comment: Might be opinionated, but lets rather not bring in this heavy lifting test infrastructure into these tiny extension modules. That's what the regressiontests module is for. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
