- upgrade Guava to the latest version
to fix critial vulnerability
Issue-ID: CPS-1987
Change-Id: I6ea314407133dea229e9626fdf2d9c938f7c7e08
Signed-off-by: halil.cakal <halil.cakal@est.tech>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>31.1-jre</version>
+ <version>32.1.3-jre</version>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
where:
scenario | dmiProperties | publicProperties || expectedDmiProperties | expectedPublicProperties
'with dmi & public properties' | ['dmi-key': 'dmi-value'] | ['public-key': 'public-value'] || '[{"name":"dmi-key","value":"dmi-value"}]' | '[{"name":"public-key","value":"public-value"}]'
where:
scenario | dmiProperties | publicProperties || expectedDmiProperties | expectedPublicProperties
'with dmi & public properties' | ['dmi-key': 'dmi-value'] | ['public-key': 'public-value'] || '[{"name":"dmi-key","value":"dmi-value"}]' | '[{"name":"public-key","value":"public-value"}]'
- 'with only public properties' | [:] | ['public-key': 'public-value'] || '[]' | '[{"name":"public-key","value":"public-value"}]'
- 'with only dmi properties' | ['dmi-key': 'dmi-value'] | [:] || '[{"name":"dmi-key","value":"dmi-value"}]' | '[]'
- 'without dmi & public properties' | [:] | [:] || '[]' | '[]'
+ 'with only public properties' | [:] | ['public-key': 'public-value'] || [:] | '[{"name":"public-key","value":"public-value"}]'
+ 'with only dmi properties' | ['dmi-key': 'dmi-value'] | [:] || '[{"name":"dmi-key","value":"dmi-value"}]' | [:]
+ 'without dmi & public properties' | [:] | [:] || [:] | [:]
}
def 'Add CM-Handle to trustLevelPerCmHandle Successfully with: #scenario.'() {
}
def 'Add CM-Handle to trustLevelPerCmHandle Successfully with: #scenario.'() {
${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()['tree:nest']}
Should Be Equal As Strings ${responseJson['name']} Bigger
${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()['tree:nest']}
Should Be Equal As Strings ${responseJson['name']} Bigger
- Should Be Equal As Strings ${responseJson['birds']} ['Falcon', 'Eagle', 'Pigeon']
+ ${length_birds}= Get Length ${responseJson['birds']}
+ Should Be Equal As Integers ${length_birds} 3
+ ${expected_list}= Create List Pigeon Falcon Eagle
+ FOR ${item_to_check} IN @{expected_list}
+ Should Contain ${responseJson['birds']} ${item_to_check}
+ END
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
def updatedTreeJsonData = readResourceDataFile('tree/updated-test-tree.json')
cpsDataService.updateNodeLeaves(GENERAL_TEST_DATASPACE, "anchor4", "/test-tree/branch[@name='left']", updatedTreeJsonData, OffsetDateTime.now())
then: 'updated tree data node can be retrieved by its normalized xpath'
def updatedTreeJsonData = readResourceDataFile('tree/updated-test-tree.json')
cpsDataService.updateNodeLeaves(GENERAL_TEST_DATASPACE, "anchor4", "/test-tree/branch[@name='left']", updatedTreeJsonData, OffsetDateTime.now())
then: 'updated tree data node can be retrieved by its normalized xpath'
- def birdsName = cpsDataService.getDataNodes(GENERAL_TEST_DATASPACE, 'anchor4',"/test-tree/branch[@name='left']/nest", FetchDescendantsOption.DIRECT_CHILDREN_ONLY)[0].leaves['birds']
- assert birdsName as String == '[Raven, Night Owl, Crow]'
+ def birdsName = cpsDataService.getDataNodes(GENERAL_TEST_DATASPACE, 'anchor4',"/test-tree/branch[@name='left']/nest", FetchDescendantsOption.DIRECT_CHILDREN_ONLY)[0].leaves['birds'] as List
+ assert birdsName.size() == 3
+ assert birdsName.containsAll('Night Owl', 'Raven', 'Crow')