blob: 786ca95fd0274ffdff1cbe587ac558477110ffb7 [file] [log] [blame]
Madan Jampani9e1a8c12016-06-27 11:19:10 -07001<!--
2 ~ Copyright 2016-present Open Networking Laboratory
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15-->
16
Ray Milkey685e34d2016-09-01 12:01:09 -070017<scenario name="distributed-consistent-map-test"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070018 description="ONOS ConsistentMap distributed primitive Test">
19 <group name="Distributed-Primitive-Map">
20
Jon Hallda9fd4a2017-02-16 14:23:38 -080021 <step name="Distributed-Primitive-Map.Test-Map-Get"
22 requires="Distributed-Primitives-Setup"
Madan Jampani145623d2016-07-22 14:55:57 -070023 exec="onos-cluster-execute-expect map-test foo get a --expect null"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070024
Jon Hallda9fd4a2017-02-16 14:23:38 -080025 <step name="Distributed-Primitive-Map.Test-Map-Put"
26 requires="Distributed-Primitive-Map.Test-Map-Get"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070027 exec="onos-execute-expect ${OCI} map-test foo put a b --expect null"/>
28
Jon Hallda9fd4a2017-02-16 14:23:38 -080029 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-Put"
30 requires="Distributed-Primitive-Map.Test-Map-Put"
Madan Jampani145623d2016-07-22 14:55:57 -070031 exec="onos-cluster-execute-expect map-test foo get a --expect b"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070032
Jon Hallda9fd4a2017-02-16 14:23:38 -080033 <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present"
34 requires="Distributed-Primitive-Map.Test-Map-Updated-After-Put"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070035 exec="onos-execute-expect ${OCI} map-test foo putIfAbsent a c --expect b"/>
36
Jon Hallda9fd4a2017-02-16 14:23:38 -080037 <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent"
38 requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070039 exec="onos-execute-expect ${OCI} map-test foo putIfAbsent b c --expect null"/>
40
Jon Hallda9fd4a2017-02-16 14:23:38 -080041 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent"
42 requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent"
Madan Jampani145623d2016-07-22 14:55:57 -070043 exec="onos-cluster-execute-expect map-test foo get b --expect c"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070044
Jon Hallda9fd4a2017-02-16 14:23:38 -080045 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet"
46 requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070047 exec="onos-execute-expect ${OCI} map-test foo putAndGet b d --expect d"/>
48
Jon Hallda9fd4a2017-02-16 14:23:38 -080049 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent"
50 requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070051 exec="onos-execute-expect ${OCI} map-test foo replace c e --expect null"/>
52
Jon Hallda9fd4a2017-02-16 14:23:38 -080053 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Present"
54 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070055 exec="onos-execute-expect ${OCI} map-test foo replace b e --expect d"/>
56
Jon Hallda9fd4a2017-02-16 14:23:38 -080057 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Not-Match"
58 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Present"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070059 exec="onos-execute-expect ${OCI} map-test foo replace b x f --expect false"/>
60
Jon Hallda9fd4a2017-02-16 14:23:38 -080061 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Match"
62 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Not-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070063 exec="onos-execute-expect ${OCI} map-test foo replace b e f --expect true"/>
64
Jon Hallda9fd4a2017-02-16 14:23:38 -080065 <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case"
66 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Match"
Madan Jampani145623d2016-07-22 14:55:57 -070067 exec="onos-cluster-execute-expect map-test foo containsValue x --expect false"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070068
Jon Hallda9fd4a2017-02-16 14:23:38 -080069 <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case"
70 requires="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case"
Madan Jampani145623d2016-07-22 14:55:57 -070071 exec="onos-cluster-execute-expect map-test foo containsValue f --expect true"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070072
Jon Hallda9fd4a2017-02-16 14:23:38 -080073 <step name="Distributed-Primitive-Map.Test-Map-Size"
74 requires="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case"
Madan Jampani145623d2016-07-22 14:55:57 -070075 exec="onos-cluster-execute-expect map-test foo size --expect 2"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070076
Jon Hallda9fd4a2017-02-16 14:23:38 -080077 <step name="Distributed-Primitive-Map.Test-Map-IsEmpty"
78 requires="Distributed-Primitive-Map.Test-Map-Size"
Madan Jampani145623d2016-07-22 14:55:57 -070079 exec="onos-cluster-execute-expect map-test foo isEmpty --expect false"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070080
Jon Hallda9fd4a2017-02-16 14:23:38 -080081 <step name="Distributed-Primitive-Map.Test-Map-Remove"
82 requires="Distributed-Primitive-Map.Test-Map-IsEmpty"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070083 exec="onos-execute-expect ${OCI} map-test foo remove b --expect f"/>
84
Jon Hallda9fd4a2017-02-16 14:23:38 -080085 <step name="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Not-Match"
86 requires="Distributed-Primitive-Map.Test-Map-Remove"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070087 exec="onos-execute-expect ${OCI} map-test foo remove a c --expect false"/>
88
Jon Hallda9fd4a2017-02-16 14:23:38 -080089 <step name="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Match"
90 requires="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Not-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070091 exec="onos-execute-expect ${OCI} map-test foo remove a b --expect true"/>
92
Jon Hallda9fd4a2017-02-16 14:23:38 -080093 <step name="Distributed-Primitive-Map.Test-Map-Clear"
94 requires="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070095 exec="onos ${OCI} map-test foo clear"/>
96
Jon Hallda9fd4a2017-02-16 14:23:38 -080097 <step name="Distributed-Primitive-Map.Test-Map-Cleared"
98 requires="Distributed-Primitive-Map.Test-Map-Clear"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070099 exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect true"/>
100
Jon Halle4a61002017-02-16 18:37:02 -0800101 <group name="Distributed-Primitive-Map.Check-Log-Exceptions"
102 requires="Distributed-Primitive-Map.Test-Map-Cleared">
103 <parallel var="${OC#}">
104 <step name="Distributed-Primitive-Map.Check-Log-Exceptions-${#}"
105 exec="onos-check-logs ${OC#}"/>
106 </parallel>
107 </group>
Madan Jampani9e1a8c12016-06-27 11:19:10 -0700108
Madan Jampani9e1a8c12016-06-27 11:19:10 -0700109 </group>
110</scenario>
111