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