#!/bin/bash

source /var/onap_tests/_test_base
source /var/onap/functions

covered_functions=(
"create_configuration_files" "clone_repo" "install_dev_tools"
"configure_bind" "install_java" "install_maven" "install_nodejs" "install_python"
"install_docker" "pull_docker_image" "install_docker_compose" "configure_service"
"start_ODL" "compile_src" "build_docker_image" "docker_openecomp_login"
"pull_openecomp_image" "pull_onap_image" "coverity_repos"
)

# test_create_configuration_files() - Verify the creation of a configuration files
function test_create_configuration_files {
    create_configuration_files

    asserts_file_exist /opt/config/nexus_docker_repo.txt
    asserts_file_exist /opt/config/nexus_username.txt
    asserts_file_exist /opt/config/nexus_password.txt
    asserts_file_exist /opt/config/openstack_username.txt
    asserts_file_exist /opt/config/tenant_id.txt
    asserts_file_exist /opt/config/dmaap_topic.txt
    asserts_file_exist /opt/config/docker_version.txt
}

# test_docker_openecomp_login() - Verify the proper login to OpenECOMP Docker Hub
function test_docker_openecomp_login {
    docker_openecomp_login
}

# test_pull_openecomp_image() - Verify the OpenECOMP container image pulling process
function test_pull_openecomp_image {
    local image_name=portal-apps
    unset docker_version
    pull_openecomp_image $image_name

    asserts_image $nexus_docker_repo/openecomp/$image_name
}

# test_pull_onap_image() - Verify the ONAP cointainer pulling process
function test_pull_onap_image {
    local image_name=portal-apps
    unset docker_version
    pull_onap_image $image_name

    asserts_image $nexus_docker_repo/onap/$image_name
}

# test_clone_repo() - Verify cloning and pulling source code from repositories
function test_clone_repo {
    clone_repo demo

    asserts_installed_package git
    asserts_file_exist $git_src_folder/demo/LICENSE.TXT
}

# test_install_dev_tools() - Verify the correct installation of developer tools
function test_install_dev_tools {
    install_dev_tools

    asserts_installed_package apt-transport-https
    asserts_installed_package ca-certificates
    asserts_installed_package curl
}

# test_configure_bind() - Verify the correct installation and configuration of bind
function test_configure_bind {
    configure_bind

    asserts_installed_package bind9
    asserts_installed_package bind9utils
    asserts_file_exist /etc/bind/zones/db.simpledemo.openecomp.org
    asserts_file_exist /etc/bind/named.conf.options
    asserts_file_exist /etc/bind/named.conf.local

    rm -rf /etc/bind/
}

# test_install_java() - Verify the correct installation of java
function test_install_java {
    install_java

    asserts_installed_package openjdk-8-jdk
}

# test_install_maven() - Verify the correct installation and configuration of maven
function test_install_maven {
    install_maven

    asserts_installed_package maven3
    asserts_installed_package openjdk-8-jdk
    asserts_file_exist $mvn_conf_file
}

# test_install_nodejs() - Verify the correct installation of NodeJS tools
function test_install_nodejs {
    install_nodejs

    asserts_installed_package nodejs
    asserts_file_exist /usr/bin/npm
}

# test_install_python() - Verify the correct installation of Python
function test_install_python {
    install_python
    asserts_installed_package python2.7
    asserts_installed_package python-dev
}

# test_install_docker() - Verify the correct installation of Docker
function test_install_docker {
    install_docker

    asserts_installed_package docker-ce
}

# test_pull_docker_image() - Verify the correct retrieve of a specific docker image
function test_pull_docker_image {
    local image=attos/dmaap
    pull_docker_image $image

    asserts_image $image
}

# test_install_docker_compose() - Verify the correct installation of Docker Compose tool
function test_install_docker_compose {
    install_docker_compose

    asserts_file_exist /opt/docker/docker-compose
}

# test_configure_service() - Verify the correct configuration of a specific init service
function test_configure_service {
    local service=mso

    configure_service $service

    asserts_file_exist /etc/init.d/$service

    rm -rf /etc/init.d/$service
}

# test_start_ODL() - Verify the installation and configuration of OpenDayLight controller
function test_start_ODL {
    start_ODL

    asserts_file_exist /opt/opendaylight/current/bin/start
}

# test_compile_src() - Verify the compilation of java code using maven tools
function test_compile_src {
    local repo=vid/asdcclient
    clone_repo $repo
    compile_src $git_src_folder/$repo

    asserts_file_exist $git_src_folder/$repo/target/asdcclient-1.0.2-SNAPSHOT.jar
}

# test_build_docker_image() - Verify that a docker image is created from source code
function test_build_docker_image {
    clone_repo ccsdk/distribution
    build_docker_image $git_src_folder/ccsdk/distribution/ubuntu docker

    asserts_image onap/ccsdk-ubuntu-image
}

# test_coverity_repos() - Verify that all the repos are covered by scripts
function test_coverity_repos {
    # Get repositories list from source code files
    repos_list=()
    for module in $( stat -c "%F %n" /var/onap/* | grep -v "_\|functions\|commons\|files" | cut -d' ' -f 3-); do
        source $module
        module_repo_list=$(eval echo \${$(basename $module)_repos[@]})
        repos_list=(${repos_list[@]} ${module_repo_list[@]})
    done

    pushd /var/onap_tests/
    cp projects.txt remaining_projects.txt
    for covered_repo in "${repos_list[@]}"; do
        sed -i '/^'${covered_repo//\//\\/}'$/d' remaining_projects.txt
    done

    threshold=75
    num_projects=$(wc -l < projects.txt)
    num_remaining_projects=$(wc -l < remaining_projects.txt)
    coverage=`echo "scale=2; 100-($num_remaining_projects/$num_projects*100)" | bc | cut -d . -f 1`
    if [ $coverage -lt $threshold ]; then
        raise_error "There are repositories that are not covered by scripts"
    fi
    popd
}

if [ "$1" != '*' ]; then
    unset covered_functions
    covered_functions=$1
fi
main "${covered_functions[@]}"
