Azure / appcat-rulesets

Repository for maintaining Rulesets for Windup
Eclipse Public License 2.0
6 stars 8 forks source link

Init Azure target transformer #58

Closed agoncal closed 1 year ago

agoncal commented 1 year ago

@mrizzi I am trying to implement https://github.com/Azure/windup-rulesets/issues/37 (enabling cloud-readiness and linux and openjdk rules when an Azure target is selected). Basically I am adding several targets:

<technology-reference-transfomers xmlns="http://windup.jboss.org/schema/jboss-ruleset">
    <transform>
        <sourceTechnology id="azure-spring-apps"/>
        <targetTechnology id="openjdk" versionRange="[11]"/>
    </transform>
    <transform>
        <sourceTechnology id="azure-spring-apps"/>
        <targetTechnology id="cloud-readiness"/>
    </transform>
    <transform>
        <sourceTechnology id="azure-spring-apps"/>
        <targetTechnology id="linux"/>
    </transform>
</technology-reference-transfomers>

When I test all the Azure rules (mvn clean test -DrunTestsMatching=azure), the overriden rule fails:

Failed tests: 
  WindupRulesTest.testWindupRules:155 
        Error with test: database-01700-test
        Cause: (Rule: database-01700-test) Assertion failed: PostgreSQL database found hint was not found!

This message comes from technology-usage/tests/database-target-discovery.windup.test.xml which has a <target>discovery</target>. So I've added the discovery target to the transformer but it does not work either.

    <transform>
        <sourceTechnology id="azure-spring-apps"/>
        <targetTechnology id="discovery"/>
    </transform>