Merge "Change format of the network file"
[multicloud/k8s.git] / kud / tests / _common_test.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright 2019 © Samsung Electronics Co., Ltd.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 set -o errexit
12 set -o nounset
13 set -o pipefail
14
15 # install_deps() - Install dependencies required for functional tests
16 function install_deps {
17     if ! $(jq --version &>/dev/null); then
18         source /etc/os-release || source /usr/lib/os-release
19         case ${ID,,} in
20             *suse)
21             ;;
22             ubuntu|debian)
23                 sudo apt-get install -y jq
24             ;;
25             rhel|centos|fedora)
26             ;;
27         esac
28     fi
29 }