implements PLN-0129
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 62.10% (17811/28682)
* Branch Coverage: 52.81% (6878/13025)
* Lines of Code: 28682
* Cyclomatic Complexity: 11494
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 654
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 62.10% (17811/28682)
* Branch Coverage: 52.81% (6878/13025)
* Lines of Code: 28682
* Cyclomatic Complexity: 11494
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 654
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good
Add ArchUnit guards for Java multi-frontend boundaries in a test-only module. Identify PBS by frontend-module origin, allow only the registry as composition root, and lock the wording in specs 19, 20, and 22. Housekeep DSC-0064 with LSN-0066.
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
package p.studio.architecture;
|
||||
|
||||
import com.tngtech.archunit.core.importer.ImportOption;
|
||||
import com.tngtech.archunit.junit.AnalyzeClasses;
|
||||
import com.tngtech.archunit.junit.ArchTest;
|
||||
import com.tngtech.archunit.lang.ArchRule;
|
||||
import p.studio.compiler.PBSDefinitions;
|
||||
import p.studio.compiler.PBSFrontendProvider;
|
||||
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
||||
import static p.studio.architecture.PbsModuleOrigins.fromFrontendApiModule;
|
||||
import static p.studio.architecture.PbsModuleOrigins.fromPbsModule;
|
||||
import static p.studio.architecture.PbsModuleOrigins.fromRegistryModule;
|
||||
|
||||
@AnalyzeClasses(packages = "p.studio", importOptions = ImportOption.DoNotIncludeTests.class)
|
||||
class PbsModuleBoundaryArchTest {
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule productionOutsideAllowlistMustNotDependOnPbsModuleTypes = noClasses()
|
||||
.that(fromPbsModule().negate())
|
||||
.and(fromRegistryModule().negate())
|
||||
.should()
|
||||
.dependOnClassesThat(fromPbsModule())
|
||||
.because("DEC-0050: only prometeu-frontend-pbs and prometeu-frontend-registry may depend on PBS module types");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule registryMustOnlyDependOnPbsProviderFacade = noClasses()
|
||||
.that(fromRegistryModule())
|
||||
.should()
|
||||
.dependOnClassesThat(
|
||||
fromPbsModule()
|
||||
.and(DescribedPredicates.notBelongingTo(PBSFrontendProvider.class, PBSDefinitions.class)))
|
||||
.because("DEC-0050: registry may depend only on PBSFrontendProvider and PBSDefinitions");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule irBackendModelsMustNotDependOnPbsModuleTypes = noClasses()
|
||||
.that(fromFrontendApiModule())
|
||||
.and()
|
||||
.resideInAPackage("p.studio.compiler.models..")
|
||||
.should()
|
||||
.dependOnClassesThat(fromPbsModule())
|
||||
.because("DEC-0050: public IRBackend contract types must not depend on PBS module types");
|
||||
}
|
||||
Reference in New Issue
Block a user