blob: 234cbb1c33c125cc646810ede50ab7407f09e7a1 [file] [log] [blame]
Dongcan Ye63813952017-11-18 14:22:25 +08001#! /bin/sh
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15TMPDIR=`mktemp -d /tmp/${0##*/}.XXXXXX` || exit 1
16export TMPDIR
17trap "rm -rf $TMPDIR" EXIT
18
19FAILURES=$TMPDIR/failures
20
21check_no_duplicate_api_test_idempotent_ids() {
22 # For API tests, an idempotent ID is assigned to each single API test,
23 # those IDs should be unique
24 output=$(check-uuid --package neutron_tempest_plugin)
25 if [ "$?" -ne 0 ]; then
26 echo "There are duplicate idempotent ids in the API tests" >>$FAILURES
27 echo "please, assign unique uuids to each API test:" >>$FAILURES
28 echo "$output" >>$FAILURES
29 fi
30}
31
32check_no_duplicate_api_test_idempotent_ids
33
34# Fail, if there are emitted failures
35if [ -f $FAILURES ]; then
36 cat $FAILURES
37 exit 1
38fi