Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3180#discussion_r235285755
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/serialization/FlowFromDOMFactoryTest.groovy
 ---
    @@ -135,6 +140,83 @@ class FlowFromDOMFactoryTest {
             assert msg.message =~ "Check that the ${KEY} value in 
nifi.properties matches the value used to encrypt the flow.xml.gz file"
         }
     
    +    @Test
    +    void 
testShouldDecryptSensitiveFlowValueRegardlessOfPropertySensitiveStatus() throws 
Exception {
    +        // Arrange
    +
    +        // Create a mock Element object to be parsed
    +
    +        // TODO: Mock call to StandardFlowSynchronizer#readFlowFromDisk()
    +        final String FLOW_XML = """<?xml version="1.0" encoding="UTF-8" 
standalone="no"?>
    +<flowController encoding-version="1.3">
    +  <maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
    +  <maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
    +  <registries/>
    +  <rootGroup>
    +    <id>32aeba59-0167-1000-fc76-847bf5d10d73</id>
    +    <name>NiFi Flow</name>
    +    <position x="0.0" y="0.0"/>
    +    <comment/>
    +    <processor>
    +      <id>32af5e4e-0167-1000-ad5f-c79ff57c851e</id>
    +      <name>Example Processor</name>
    +      <position x="461.0" y="80.0"/>
    +      <styles/>
    +      <comment/>
    +      <class>org.apache.nifi.processors.test.ExampleProcessor</class>
    +      <bundle>
    +        <group>org.apache.nifi</group>
    +        <artifact>nifi-test-nar</artifact>
    +        <version>1.9.0-SNAPSHOT</version>
    +      </bundle>
    +      <maxConcurrentTasks>1</maxConcurrentTasks>
    +      <schedulingPeriod>0 sec</schedulingPeriod>
    +      <penalizationPeriod>30 sec</penalizationPeriod>
    +      <yieldPeriod>1 sec</yieldPeriod>
    +      <bulletinLevel>WARN</bulletinLevel>
    +      <lossTolerant>false</lossTolerant>
    +      <scheduledState>STOPPED</scheduledState>
    +      <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
    +      <executionNode>ALL</executionNode>
    +      <runDurationNanos>0</runDurationNanos>
    +      <property>
    +        <name>Plaintext Property</name>
    +        <value>plain value</value>
    +      </property>
    +      <property>
    +        <name>Sensitive Property</name>
    +        
<value>enc{29077eedc9af7515cc3e0d2d29a93a5cbb059164876948458fd0c890009c8661}</value>
    +      </property>
    +    </processor>
    +  </rootGroup>
    +  <controllerServices/>
    +  <reportingTasks/>
    +</flowController>
    +"""
    +
    +        // TODO: Mock call to StandardFlowSynchronizer#parseFlowBytes()
    --- End diff --
    
    Do we still need this TODO comment?


---

Reply via email to