dist-map.xml
4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!--
~ Copyright 2016-present Open Networking Laboratory
~
~ Licensed 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.
-->
<scenario name="Distributed consistent map test"
description="ONOS ConsistentMap distributed primitive Test">
<group name="Distributed-Primitive-Map">
<!--<import file="${ONOS_SCENARIOS}/setup.xml"/>
<dependency name="Setup" requires="Prerequisites"/>-->
<step name="Activate-Distributed-Primitives-App"
exec="onos ${OCI} app activate org.onosproject.distributedprimitives"/>
<step name="Test-Map-Get" requires="^"
exec="onos-cluster-execute-expect map-test foo get a --expect null"/>
<step name="Test-Map-Put" requires="^"
exec="onos-execute-expect ${OCI} map-test foo put a b --expect null"/>
<step name="Test-Map-Updated-After-Put" requires="^"
exec="onos-cluster-execute-expect map-test foo get a --expect b"/>
<step name="Test-Map-PutIfAbsent-When-Key-Present" requires="^"
exec="onos-execute-expect ${OCI} map-test foo putIfAbsent a c --expect b"/>
<step name="Test-Map-PutIfAbsent-When-Key-Absent" requires="^"
exec="onos-execute-expect ${OCI} map-test foo putIfAbsent b c --expect null"/>
<step name="Test-Map-Updated-After-PutIfAbsent" requires="^"
exec="onos-cluster-execute-expect map-test foo get b --expect c"/>
<step name="Test-Map-Updated-After-PutAndGet" requires="^"
exec="onos-execute-expect ${OCI} map-test foo putAndGet b d --expect d"/>
<step name="Test-Map-Replace-When-Key-Absent" requires="^"
exec="onos-execute-expect ${OCI} map-test foo replace c e --expect null"/>
<step name="Test-Map-Replace-When-Key-Present" requires="^"
exec="onos-execute-expect ${OCI} map-test foo replace b e --expect d"/>
<step name="Test-Map-Replace-When-Value-Does-Not-Match" requires="^"
exec="onos-execute-expect ${OCI} map-test foo replace b x f --expect false"/>
<step name="Test-Map-Replace-When-Value-Does-Match" requires="^"
exec="onos-execute-expect ${OCI} map-test foo replace b e f --expect true"/>
<step name="Test-Map-ContainsValue-False-Case" requires="^"
exec="onos-cluster-execute-expect map-test foo containsValue x --expect false"/>
<step name="Test-Map-ContainsValue-True-Case" requires="^"
exec="onos-cluster-execute-expect map-test foo containsValue f --expect true"/>
<step name="Test-Map-Size" requires="^"
exec="onos-cluster-execute-expect map-test foo size --expect 2"/>
<step name="Test-Map-IsEmpty" requires="^"
exec="onos-cluster-execute-expect map-test foo isEmpty --expect false"/>
<step name="Test-Map-Remove" requires="^"
exec="onos-execute-expect ${OCI} map-test foo remove b --expect f"/>
<step name="Test-Map-Remove-Key-Value-Does-Not-Match" requires="^"
exec="onos-execute-expect ${OCI} map-test foo remove a c --expect false"/>
<step name="Test-Map-Remove-Key-Value-Does-Match" requires="^"
exec="onos-execute-expect ${OCI} map-test foo remove a b --expect true"/>
<step name="Test-Map-Clear" requires="^"
exec="onos ${OCI} map-test foo clear"/>
<step name="Test-Map-Cleared" requires="^"
exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect true"/>
<!--Check with check logs-->
<step name="Check-Log-Exceptions" requires="^"
exec="onos-check-logs ${OCI}"/>
<step name="Teardown-Distributed-Primitives-Test-App" requires="^"
exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/>
</group>
</scenario>