#!/bin/bash

source /var/onap/commons

# asserts_http_status_code() - Function that determines if a HTTP status code is retrieved from URL
function asserts_http_status_code {
    local url=$1
    local expected_code=${2:-"200"}

    code=$(curl -I $url | head -n 1 | cut -d$' ' -f2)
    local error_msg=${3:-"The URL $url responded with $code status code"}
    if [[ "$code" != "$expected_code" ]]; then
        raise_error $error_msg
    fi
}

# asserts_process() - Function that verifies if a specific process is running
function asserts_process {
    local process=$1
    local error_msg=${2:-"There is no $process running process"}

    if [[ "ps -ef | grep $process" == "" ]]; then
        raise_error $error_msg
    fi
}

# asserts_java_process() - Function that verifies if a specific java process is running
function asserts_java_process {
    local process=$1
    local error_msg=${2:-"There is no $process java running process"}

    install_java
    if [[ "jps | grep $process" == "" ]]; then
        raise_error $error_msg
    fi
}

# asserts_image_running() - Function that verifies if a specific image is running
function asserts_image_running {
    local image=$1
    local error_msg=${2:-"There is no process with $image image running"}

    asserts_image $image
    if [[ "$(docker ps -q --filter=ancestor=$image 2> /dev/null)" == "" ]]; then
        raise_error $error_msg
    fi
}

# asserts_image() - Function that verifies if a specific image was created
function asserts_image {
    local image=$1
    local error_msg=${2:-"There is no $image image"}

    install_docker
    if [[ "$(docker images -q $image 2> /dev/null)" == "" ]]; then
        raise_error $error_msg
    fi
}

# asserts_installed_package() - Function that verifies if a specific package was installed.
function asserts_installed_package {
    local package=$1
    local error_msg=${2:-"$package wasn't installed"}

    if ! is_package_installed $package; then
        raise_error $error_msg
    fi
}

# asserts_file_exist() - Function that verifies if a specific file exists
function asserts_file_exist {
    local file=$1
    local error_msg=${2:-"$file doesn't exist"}

    if [ ! -f $file ]; then
        raise_error $error_msg
    fi
}

# asserts_env_set() - Function that verities that an environment variable is set
function asserts_env_set {
    local variable=$1
    local error_msg=${2:-"$variable wasn't set"}

    if [ -z ${variable+x} ]; then
        raise_error $error_msg
    fi
}

# raise_error() - Function that prints and exits the execution
function raise_error {
    echo $@
    exit 1
}
