Update DFC tests to use file based conifg
[integration.git] / test / mocks / datafilecollector-testharness / common / test_env.sh
1 #!/bin/bash
2 #
3 # Modifications copyright (C) 2021 Nokia. All rights reserved
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11
12 # This env variable is only needed if the auto test scripts tests are executed in a different folder than 'auto-test' in the integration repo 
13 # Change '<local-path>' to your path to the integration repo. In addition to the auto-test, the 'common' dir is needed if not executed in the
14 # integration repo.
15 #
16 #export SIM_GROUP=<local-path>/integration/test/mocks/datafilecollector-testharness/simulator-group/
17
18
19 # Set the images for the DFC app to use for the auto tests. Do not add the image tag.
20 #
21 # Remote image shall point to the image in the nexus repository
22 export DFC_REMOTE_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server
23 #
24 # Local image and tag, shall point to locally built image (non-nexus path)
25 export DFC_LOCAL_IMAGE=onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server
26
27
28 # Common env var for auto-test.
29
30 DFC_PORT=8100                          #Up to five dfc apps can be used, dfc_app0 will be mapped to 8100 on local machine for http, dfc_app1 mapped to 8101 etc
31 DFC_PORT_SECURE=8433                   #Up to five dfc apps can be used, dfc_app0 will be mapped to 8433 on local machine for hhtps, dfc_app1 mapped to 8434 etc
32 DFC_LOGPATH="/var/log/ONAP/application.log"  #Path the application log in the dfc container
33 DOCKER_SIM_NWNAME="dfcnet"             #Name of docker private network
34 CONFIG_BINDING_SERVICE="config-binding-service"  #Host name of CBS
35 CONFIG_BINDING_SERVICE_SERVICE_PORT=10000  #CBS port
36 MR_PORT=2222                           #MR simulator port number http
37 DR_PORT=3906                           #DR simulator port number http
38 DR_PORT_SECURE=3907                    #DR simulator port number for https
39 DRR_PORT=3908                          #DR Redirect simulator port number for http
40 DRR_PORT_SECURE=3909                   #DR Redirect simulator port number for https
41 DFC_APP_BASE="dfc_app"                 #Base name of the dfc containers. Instance 0 will be named dfc_app0, instance 1 will named dfc_app1 etc
42 DFC_MAX_NUM=5                          #Max number of dfc containers to run in paralell in auto test
43 DFC_MAX_IDX=$(($DFC_MAX_NUM - 1))      #Max index of the dfc containers
44 SFTP_BASE="dfc_sftp-server"            #Base name of the dfc_sftp-server containers. Instance 0 will be named dfc_sftp-server0, instance 1 will named dfc_sftp-server1 etc
45 FTPES_BASE="dfc_ftpes-server-vsftpd"    #Base name of the dfc_ftpes-server-vsftpd containers. Instance 0 will be named dfc_ftpes-server-vsftpd0, instance 1 will named dfc_ftpes-server-vsftpd1 etc
46 HTTP_HTTPS_BASE="dfc_http-https-server" #Base name of the dfc_http-https-server containers. Instance 0 will be named dfc_http-https-server0, instance 1 will named dfc_http-https-server1 etc
47 FTP_MAX_NUM=5                          #Max number of sftp and ftpes containers to run in paralell in auto test
48 HTTP_MAX_NUM=5                         #Max number of http/https containers to run in paralell in auto test
49 FTP_MAX_IDX=$(($FTP_MAX_NUM - 1))      #Max index of sftp and ftpes containers
50 HTTP_MAX_IDX=$(($HTTP_MAX_NUM - 1))    #Max index of http/https containers
51
52 #List of sftp server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc and the simulators in a private docker network
53 SFTP_SIMS_CONTAINER="sftp-server0:22,sftp-server1:22,sftp-server2:22,sftp-server3:22,sftp-server4:22"
54
55 #List of sftp server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc and the simulators in a private docker network
56 FTPES_SIMS_CONTAINER="ftpes-server-vsftpd0:21,ftpes-server-vsftpd1:21,ftpes-server-vsftpd2:21,ftpes-server-vsftpd3:21,ftpes-server-vsftpd4:21"
57
58 #List of http/https/https with no authorization/with jwt token server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc and the simulators in a private docker network
59 HTTP_SIMS_CONTAINER="http-https-server0:80,http-https-server1:80,http-https-server2:80,http-https-server3:80,http-https-server4:80"
60 HTTP_JWT_SIMS_CONTAINER="http-https-server0:32000,http-https-server1:32000,http-https-server2:32000,http-https-server3:32000,http-https-server4:32000"
61 HTTPS_SIMS_CONTAINER="http-https-server0:443,http-https-server1:443,http-https-server2:443,http-https-server3:443,http-https-server4:443"
62 HTTPS_SIMS_NO_AUTH_CONTAINER="http-https-server0:8080,http-https-server1:8080,http-https-server2:8080,http-https-server3:8080,http-https-server4:8080"
63 HTTPS_JWT_SIMS_CONTAINER="http-https-server0:32100,http-https-server1:32100,http-https-server2:32100,http-https-server3:32100,http-https-server4:32100"
64
65 #List of sftp server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc as stand along app and the simulators in a private docker network
66 SFTP_SIMS_LOCALHOST="localhost:1022,localhost:1023,localhost:1024,localhost:1025,localhost:1026"
67
68 #List of ftpes server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc as stand along app and the simulators in a private docker network
69 FTPES_SIMS_LOCALHOST="localhost:1032,localhost:1033,localhost:1034,localhost:1035,localhost:1036"
70
71 #List of http/https/https with no authorization/with jwt token server name and port number, used by MR sim to produce file urls. Theses server names and ports are used when running dfc as stand along app and the simulators in a private docker network
72 HTTP_SIMS_LOCALHOST="localhost:81,localhost:82,localhost:83,localhost:84,localhost:85"
73 HTTP_JWT_SIMS_LOCALHOST="localhost:32001,localhost:32002,localhost:32003,localhost:32004,localhost:32005"
74 HTTPS_SIMS_LOCALHOST="localhost:444,localhost:445,localhost:446,localhost:447,localhost:448"
75 HTTPS_SIMS_NO_AUTH_LOCALHOST="localhost:8081,localhost:8082,localhost:8083,localhost:8084,localhost:8085"
76 HTTPS_JWT_SIMS_LOCALHOST="localhost:32101,localhost:32102,localhost:32103,localhost:32104,localhost:32105"
77
78 export SFTP_SIMS=$SFTP_SIMS_CONTAINER   #This env will be set to SFTP_SIMS_LOCALHOST if auto test is executed with 'manual-app'
79 export FTPES_SIMS=$FTPES_SIMS_CONTAINER   #This env will be set to FTPES_SIMS_LOCALHOST if auto test is executed with 'manual-app'
80 export HTTP_SIMS=$HTTP_SIMS_CONTAINER   #This env will be set to HTTP_SIMS_LOCALHOST if auto test is executed with 'manual-app'
81 export HTTP_JWT_SIMS=$HTTP_JWT_SIMS_CONTAINER #This env will be set to HTTP_JWT_SIMS_LOCALHOST if auto test is executed with 'manual-app'
82 export HTTPS_SIMS=$HTTPS_SIMS_CONTAINER   #This env will be set to HTTPS_SIMS_LOCALHOST if auto test is executed with 'manual-app'
83 export HTTPS_SIMS_NO_AUTH=$HTTPS_SIMS_NO_AUTH_CONTAINER   #This env will be set to HTTPS_SIMS_NO_AUTH_LOCALHOST if auto test is executed with 'manual-app'
84 export HTTPS_JWT_SIMS=$HTTPS_JWT_SIMS_CONTAINER   #This env will be set to HTTPS_JWT_SIMS_LOCALHOST if auto test is executed with 'manual-app'
85
86 #Host name of the DR redirect simulator
87 export DR_REDIR_SIM="drsim_redir"       #This env will be set to 'localhost' if auto test is executed with arg 'manual-app'
88