blob: 58c15c2ea9d21f325d5f4ceee02f3322cab6e57b [file] [log] [blame]
Madan Jampani9e1a8c12016-06-27 11:19:10 -07001<!--
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 ~ Copyright 2016-present Open Networking Foundation
Madan Jampani9e1a8c12016-06-27 11:19:10 -07003 ~
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"
Madan Jampani145623d2016-07-22 14:55:57 -070022 exec="onos-cluster-execute-expect map-test foo get a --expect null"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070023
Jon Hallda9fd4a2017-02-16 14:23:38 -080024 <step name="Distributed-Primitive-Map.Test-Map-Put"
25 requires="Distributed-Primitive-Map.Test-Map-Get"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070026 exec="onos-execute-expect ${OCI} map-test foo put a b --expect null"/>
27
Jon Hallda9fd4a2017-02-16 14:23:38 -080028 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-Put"
29 requires="Distributed-Primitive-Map.Test-Map-Put"
Madan Jampani145623d2016-07-22 14:55:57 -070030 exec="onos-cluster-execute-expect map-test foo get a --expect b"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070031
Jon Hallda9fd4a2017-02-16 14:23:38 -080032 <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present"
33 requires="Distributed-Primitive-Map.Test-Map-Updated-After-Put"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070034 exec="onos-execute-expect ${OCI} map-test foo putIfAbsent a c --expect b"/>
35
Jon Hallda9fd4a2017-02-16 14:23:38 -080036 <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent"
37 requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070038 exec="onos-execute-expect ${OCI} map-test foo putIfAbsent b c --expect null"/>
39
Jon Hallda9fd4a2017-02-16 14:23:38 -080040 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent"
41 requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent"
Madan Jampani145623d2016-07-22 14:55:57 -070042 exec="onos-cluster-execute-expect map-test foo get b --expect c"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070043
Jon Hallda9fd4a2017-02-16 14:23:38 -080044 <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet"
45 requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070046 exec="onos-execute-expect ${OCI} map-test foo putAndGet b d --expect d"/>
47
Jon Hallda9fd4a2017-02-16 14:23:38 -080048 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent"
49 requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070050 exec="onos-execute-expect ${OCI} map-test foo replace c e --expect null"/>
51
Jon Hallda9fd4a2017-02-16 14:23:38 -080052 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Present"
53 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070054 exec="onos-execute-expect ${OCI} map-test foo replace b e --expect d"/>
55
Jon Hallda9fd4a2017-02-16 14:23:38 -080056 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Not-Match"
57 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Present"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070058 exec="onos-execute-expect ${OCI} map-test foo replace b x f --expect false"/>
59
Jon Hallda9fd4a2017-02-16 14:23:38 -080060 <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Match"
61 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Not-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070062 exec="onos-execute-expect ${OCI} map-test foo replace b e f --expect true"/>
63
Jon Hallda9fd4a2017-02-16 14:23:38 -080064 <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case"
65 requires="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Match"
Madan Jampani145623d2016-07-22 14:55:57 -070066 exec="onos-cluster-execute-expect map-test foo containsValue x --expect false"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070067
Jon Hallda9fd4a2017-02-16 14:23:38 -080068 <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case"
69 requires="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case"
Madan Jampani145623d2016-07-22 14:55:57 -070070 exec="onos-cluster-execute-expect map-test foo containsValue f --expect true"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070071
Jon Hallda9fd4a2017-02-16 14:23:38 -080072 <step name="Distributed-Primitive-Map.Test-Map-Size"
73 requires="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case"
Madan Jampani145623d2016-07-22 14:55:57 -070074 exec="onos-cluster-execute-expect map-test foo size --expect 2"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070075
Jon Hallda9fd4a2017-02-16 14:23:38 -080076 <step name="Distributed-Primitive-Map.Test-Map-IsEmpty"
77 requires="Distributed-Primitive-Map.Test-Map-Size"
Madan Jampani145623d2016-07-22 14:55:57 -070078 exec="onos-cluster-execute-expect map-test foo isEmpty --expect false"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070079
Jon Hallda9fd4a2017-02-16 14:23:38 -080080 <step name="Distributed-Primitive-Map.Test-Map-Remove"
81 requires="Distributed-Primitive-Map.Test-Map-IsEmpty"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070082 exec="onos-execute-expect ${OCI} map-test foo remove b --expect f"/>
83
Jon Hallda9fd4a2017-02-16 14:23:38 -080084 <step name="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Not-Match"
85 requires="Distributed-Primitive-Map.Test-Map-Remove"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070086 exec="onos-execute-expect ${OCI} map-test foo remove a c --expect false"/>
87
Jon Hallda9fd4a2017-02-16 14:23:38 -080088 <step name="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Match"
89 requires="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Not-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070090 exec="onos-execute-expect ${OCI} map-test foo remove a b --expect true"/>
91
Jon Hallda9fd4a2017-02-16 14:23:38 -080092 <step name="Distributed-Primitive-Map.Test-Map-Clear"
93 requires="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Match"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070094 exec="onos ${OCI} map-test foo clear"/>
95
Jon Hallda9fd4a2017-02-16 14:23:38 -080096 <step name="Distributed-Primitive-Map.Test-Map-Cleared"
97 requires="Distributed-Primitive-Map.Test-Map-Clear"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070098 exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect true"/>
99
Jon Halle4a61002017-02-16 18:37:02 -0800100 <group name="Distributed-Primitive-Map.Check-Log-Exceptions"
101 requires="Distributed-Primitive-Map.Test-Map-Cleared">
102 <parallel var="${OC#}">
103 <step name="Distributed-Primitive-Map.Check-Log-Exceptions-${#}"
104 exec="onos-check-logs ${OC#}"/>
105 </parallel>
106 </group>
Madan Jampani9e1a8c12016-06-27 11:19:10 -0700107
Madan Jampani9e1a8c12016-06-27 11:19:10 -0700108 </group>
109</scenario>
110