Files
d3a7500958553441fd0f28a12aa1f073cbc9e6b9
Emilien Macchi
d3a7500958
scenario001: configure and run tempest
* configure tempest with a separated manifest * put Puppet return code testing in a function * execute both manifests (tempest would be the last one) * run tempest at the end of run-tests.sh This is now a PoC for Keystone. We might need to adjust the way to run Tempest to be more flexible and support different scenarios. Co-Authored-By: Paul Belanger <pabelanger@redhat.com> Depends-On: I7c3d20a61aa88a25f1215cccb4cb36168eab05c5 Change-Id: I4b8f7fa7a694743758ea2073b532184c587899d1
53 lines
1.2 KiB
Bash
Executable File
53 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -ex
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
if [ $(id -u) != 0 ]; then
# preserve environment so we can have ZUUL_* params
SUDO='sudo -E'
fi
$SUDO ./install_modules.sh
PUPPET_ARGS="--detailed-exitcodes --verbose --color=false --debug"
function run_puppet() {
local manifest=1ドル
$SUDO puppet apply $PUPPET_ARGS fixtures/${manifest}.pp
local res=$?
return $res
}
# Run puppet and assert something changes.
set +e
run_puppet scenario001
RESULT=$?
set -e
if [ $RESULT -ne 2 ]; then
exit 1
fi
# Run puppet a second time and assert nothing changes.
set +e
run_puppet scenario001
RESULT=$?
set -e
if [ $RESULT -ne 0 ]; then
exit 1
fi
cd /tmp/tempest; tox -eall -- identity