aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/tests/test_ccsdk
blob: 489ccdb2d8dcf329bcf6e355429dc92912b1c9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash

source /var/onap_tests/_test_base
source /var/onap/ccsdk

covered_functions=(
"clone_ccsdk_repos" "compile_ccsdk_repos" "get_ccsdk_images"
)

# test_clone_ccsdk_repos() - Verify that CCSDL repositories are retrieved properly
function test_clone_ccsdk_repos {
    clone_repos "ccsdk"

    asserts_file_exist $ccsdk_src_folder/dashboard/pom.xml
    asserts_file_exist $ccsdk_src_folder/distribution/pom.xml
    asserts_file_exist $ccsdk_src_folder/parent/pom.xml
    asserts_file_exist $ccsdk_src_folder/platform/blueprints/pom.xml
    asserts_file_exist $ccsdk_src_folder/platform/nbapi/pom.xml
    asserts_file_exist $ccsdk_src_folder/platform/plugins/pom.xml
    asserts_file_exist $ccsdk_src_folder/sli/adaptors/pom.xml
    asserts_file_exist $ccsdk_src_folder/sli/core/pom.xml
    asserts_file_exist $ccsdk_src_folder/sli/northbound/pom.xml
    asserts_file_exist $ccsdk_src_folder/sli/plugins/pom.xml
    asserts_file_exist $ccsdk_src_folder/storage/esaas/pom.xml
    asserts_file_exist $ccsdk_src_folder/storage/pgaas/pom.xml
    asserts_file_exist $ccsdk_src_folder/utils/pom.xml
}

# test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories
function test_compile_ccsdk_repos {
    clone_repos "ccsdk"
    compile_repos "ccsdk"

    asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-common/target/ccsdk-app-common-1.1.0-SNAPSHOT.jar
    asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-os/target/ccsdk-app-os-1.1.0-SNAPSHOT.war
    asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-overlay/target/ccsdk-app-overlay-1.1.0-SNAPSHOT.war
    asserts_file_exist $ccsdk_src_folder/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip
    asserts_file_exist $ccsdk_src_folder/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip
    asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-*.war

    #for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do
        #for component in features provider; do
            #asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar
        #done
        #asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip
    #done

    #for core in dblib filters sli sliapi sliPluginUtils; do
    for core in dblib; do
        for component in features provider; do
            asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-*-SNAPSHOT.jar
        done
        asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-*-SNAPSHOT-installer.zip
    done
    #asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-*-SNAPSHOT.jar
    #asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-*-SNAPSHOT.jar
    #asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-*-SNAPSHOT.jar

    for northbound in asdcApi dataChange; do
        for component in features model provider; do
            asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-*-SNAPSHOT.jar
        done
        asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-*-SNAPSHOT-installer.zip
    done
    asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-*-SNAPSHOT.jar
    asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-*-SNAPSHOT.jar

    for plugin in properties-node restapi-call-node; do
        for component in features provider; do
            asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-*-SNAPSHOT.jar
        done
        asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-*-SNAPSHOT-installer.zip
    done
}

# test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly
function test_get_ccsdk_images {
    clone_repos "ccsdk"
    get_ccsdk_images

    for image in dgbuilder odlsli odl ubuntu; do
        asserts_image onap/ccsdk-$image-image
    done
}

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