blob: f371d919d46b79a2861314a72d55e0c42a9d3270 [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-value-test"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070018 description="ONOS AtomicValue distributed primitive Test">
19 <group name="Distributed-Primitive-Value">
20
Jon Hallda9fd4a2017-02-16 14:23:38 -080021 <step name="Distributed-Primitive-Value.Test-Value-Initial-Value"
Madan Jampani145623d2016-07-22 14:55:57 -070022 exec="onos-cluster-execute-expect value-test test-value get --expect null"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070023
Jon Hallda9fd4a2017-02-16 14:23:38 -080024 <step name="Distributed-Primitive-Value.Test-Value-Set"
25 requires="Distributed-Primitive-Value.Test-Value-Initial-Value"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070026 exec="onos ${OCI} value-test test-value set v0"/>
27
Jon Hallda9fd4a2017-02-16 14:23:38 -080028 <step name="Distributed-Primitive-Value.Test-Value-Get"
29 requires="Distributed-Primitive-Value.Test-Value-Set"
Madan Jampani145623d2016-07-22 14:55:57 -070030 exec="onos-cluster-execute-expect value-test test-value get --expect v0"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070031
Jon Hallda9fd4a2017-02-16 14:23:38 -080032 <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-False"
33 requires="Distributed-Primitive-Value.Test-Value-Get"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070034 exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v1 v2 --expect false"/>
35
Jon Hallda9fd4a2017-02-16 14:23:38 -080036 <step name="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS"
37 requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-False"
Madan Jampani145623d2016-07-22 14:55:57 -070038 exec="onos-cluster-execute-expect value-test test-value get --expect v0"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070039
Jon Hallda9fd4a2017-02-16 14:23:38 -080040 <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-True"
41 requires="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070042 exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v0 v1 --expect true"/>
43
Jon Hallda9fd4a2017-02-16 14:23:38 -080044 <step name="Distributed-Primitive-Value.Test-Value-Updated-After-CAS"
45 requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-True"
Madan Jampani145623d2016-07-22 14:55:57 -070046 exec="onos-cluster-execute-expect value-test test-value get --expect v1"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070047
Jon Hallda9fd4a2017-02-16 14:23:38 -080048 <step name="Distributed-Primitive-Value.Destroy-Value"
49 requires="Distributed-Primitive-Value.Test-Value-Updated-After-CAS"
Ray Milkey685e34d2016-09-01 12:01:09 -070050 exec="onos ${OCI} value-test test-value set null"/>
51
Jon Halle4a61002017-02-16 18:37:02 -080052 <group name="Distributed-Primitive-Value.Check-Log-Exceptions"
53 requires="Distributed-Primitive-Value.Destroy-Value">
54 <parallel var="${OC#}">
55 <step name="Distributed-Primitive-Value.Check-Log-Exceptions-${#}"
56 exec="onos-check-logs ${OC#}"/>
57 </parallel>
58 </group>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070059
Madan Jampani9e1a8c12016-06-27 11:19:10 -070060 </group>
61</scenario>
62