Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 1 | <!-- |
| 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 Milkey | 685e34d | 2016-09-01 12:01:09 -0700 | [diff] [blame] | 17 | <scenario name="distributed-consistent-map-test" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 18 | description="ONOS ConsistentMap distributed primitive Test"> |
| 19 | <group name="Distributed-Primitive-Map"> |
| 20 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 21 | <step name="Distributed-Primitive-Map.Test-Map-Get" |
| 22 | requires="Distributed-Primitives-Setup" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 23 | exec="onos-cluster-execute-expect map-test foo get a --expect null"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 24 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 25 | <step name="Distributed-Primitive-Map.Test-Map-Put" |
| 26 | requires="Distributed-Primitive-Map.Test-Map-Get" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 27 | exec="onos-execute-expect ${OCI} map-test foo put a b --expect null"/> |
| 28 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 29 | <step name="Distributed-Primitive-Map.Test-Map-Updated-After-Put" |
| 30 | requires="Distributed-Primitive-Map.Test-Map-Put" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 31 | exec="onos-cluster-execute-expect map-test foo get a --expect b"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 32 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 33 | <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present" |
| 34 | requires="Distributed-Primitive-Map.Test-Map-Updated-After-Put" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 35 | exec="onos-execute-expect ${OCI} map-test foo putIfAbsent a c --expect b"/> |
| 36 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 37 | <step name="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent" |
| 38 | requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Present" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 39 | exec="onos-execute-expect ${OCI} map-test foo putIfAbsent b c --expect null"/> |
| 40 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 41 | <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent" |
| 42 | requires="Distributed-Primitive-Map.Test-Map-PutIfAbsent-When-Key-Absent" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 43 | exec="onos-cluster-execute-expect map-test foo get b --expect c"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 44 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 45 | <step name="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet" |
| 46 | requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutIfAbsent" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 47 | exec="onos-execute-expect ${OCI} map-test foo putAndGet b d --expect d"/> |
| 48 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 49 | <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent" |
| 50 | requires="Distributed-Primitive-Map.Test-Map-Updated-After-PutAndGet" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 51 | exec="onos-execute-expect ${OCI} map-test foo replace c e --expect null"/> |
| 52 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 53 | <step name="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Present" |
| 54 | requires="Distributed-Primitive-Map.Test-Map-Replace-When-Key-Absent" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 55 | exec="onos-execute-expect ${OCI} map-test foo replace b e --expect d"/> |
| 56 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 57 | <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 Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 59 | exec="onos-execute-expect ${OCI} map-test foo replace b x f --expect false"/> |
| 60 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 61 | <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 Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 63 | exec="onos-execute-expect ${OCI} map-test foo replace b e f --expect true"/> |
| 64 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 65 | <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case" |
| 66 | requires="Distributed-Primitive-Map.Test-Map-Replace-When-Value-Does-Match" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 67 | exec="onos-cluster-execute-expect map-test foo containsValue x --expect false"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 68 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 69 | <step name="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case" |
| 70 | requires="Distributed-Primitive-Map.Test-Map-ContainsValue-False-Case" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 71 | exec="onos-cluster-execute-expect map-test foo containsValue f --expect true"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 72 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 73 | <step name="Distributed-Primitive-Map.Test-Map-Size" |
| 74 | requires="Distributed-Primitive-Map.Test-Map-ContainsValue-True-Case" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 75 | exec="onos-cluster-execute-expect map-test foo size --expect 2"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 76 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 77 | <step name="Distributed-Primitive-Map.Test-Map-IsEmpty" |
| 78 | requires="Distributed-Primitive-Map.Test-Map-Size" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 79 | exec="onos-cluster-execute-expect map-test foo isEmpty --expect false"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 80 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 81 | <step name="Distributed-Primitive-Map.Test-Map-Remove" |
| 82 | requires="Distributed-Primitive-Map.Test-Map-IsEmpty" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 83 | exec="onos-execute-expect ${OCI} map-test foo remove b --expect f"/> |
| 84 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 85 | <step name="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Not-Match" |
| 86 | requires="Distributed-Primitive-Map.Test-Map-Remove" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 87 | exec="onos-execute-expect ${OCI} map-test foo remove a c --expect false"/> |
| 88 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 89 | <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 Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 91 | exec="onos-execute-expect ${OCI} map-test foo remove a b --expect true"/> |
| 92 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 93 | <step name="Distributed-Primitive-Map.Test-Map-Clear" |
| 94 | requires="Distributed-Primitive-Map.Test-Map-Remove-Key-Value-Does-Match" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 95 | exec="onos ${OCI} map-test foo clear"/> |
| 96 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 97 | <step name="Distributed-Primitive-Map.Test-Map-Cleared" |
| 98 | requires="Distributed-Primitive-Map.Test-Map-Clear" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 99 | exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect true"/> |
| 100 | |
Jon Hall | e4a6100 | 2017-02-16 18:37:02 -0800 | [diff] [blame] | 101 | <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 Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 108 | |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 109 | </group> |
| 110 | </scenario> |
| 111 | |