@@ -61,11 +61,17 @@ patch_consensus_config() {
61
61
init_pool () {
62
62
local _patch_config=" ${1:- yes} " ;
63
63
local _localnet_init_target=${2:- localnet_init}
64
+ local _binary_version=${3:- " " }
64
65
65
66
log " Setting up pool"
66
67
67
- log " -> Generating network configuration" > ${DETAILED_OUTPUT_TARGET}
68
- make ${_localnet_init_target} & > ${DETAILED_OUTPUT_TARGET}
68
+ if [ -n " $_binary_version " ]; then
69
+ log " -> Generating network configuration with binary version=$_binary_version " > ${DETAILED_OUTPUT_TARGET}
70
+ make ${_localnet_init_target} MAINNET_STABLE_VERSION=$_binary_version & > ${DETAILED_OUTPUT_TARGET}
71
+ else
72
+ log " -> Generating network configuration" > ${DETAILED_OUTPUT_TARGET}
73
+ make ${_localnet_init_target} & > ${DETAILED_OUTPUT_TARGET}
74
+ fi
69
75
70
76
if [ " $_patch_config " = " yes" ];
71
77
then
@@ -105,31 +111,31 @@ make image &>${DETAILED_OUTPUT_TARGET}
105
111
106
112
cleanup_pool
107
113
108
- # Light Client Proxy Cli shell tests
109
- if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " light " ]]; then
110
- CLI_SHELL_TESTS=$( find integration_tests/light_client_proxy -type f -name ' *.sh' -not -name " common.sh" | sort )
114
+ # Cli shell tests
115
+ if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " cli " ]]; then
116
+ CLI_SHELL_TESTS=$( find integration_tests/cli -type f -name ' *.sh' -not -name " common.sh" )
111
117
112
- for CLI_SHELL_TEST in ${CLI_SHELL_TESTS} ; do
113
- init_pool
118
+ for CLI_SHELL_TEST in ${CLI_SHELL_TESTS} ; do
119
+ init_pool
114
120
115
- log " *****************************************************************************************"
116
- log " Running $CLI_SHELL_TEST "
117
- log " *****************************************************************************************"
121
+ log " *****************************************************************************************"
122
+ log " Running $CLI_SHELL_TEST "
123
+ log " *****************************************************************************************"
118
124
119
- if bash " $CLI_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
120
- log " $CLI_SHELL_TEST finished successfully"
121
- else
122
- log " $CLI_SHELL_TEST failed"
123
- exit 1
124
- fi
125
+ if bash " $CLI_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
126
+ log " $CLI_SHELL_TEST finished successfully"
127
+ else
128
+ log " $CLI_SHELL_TEST failed"
129
+ exit 1
130
+ fi
125
131
126
- cleanup_pool
127
- done
128
- fi
132
+ cleanup_pool
133
+ done
134
+ fi
129
135
130
- # Cli shell tests
131
- if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " cli " ]]; then
132
- CLI_SHELL_TESTS=$( find integration_tests/cli -type f -name ' *.sh' -not -name " common.sh" )
136
+ # Light Client Proxy Cli shell tests
137
+ if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " light " ]]; then
138
+ CLI_SHELL_TESTS=$( find integration_tests/light_client_proxy -type f -name ' *.sh' -not -name " common.sh" )
133
139
134
140
for CLI_SHELL_TEST in ${CLI_SHELL_TESTS} ; do
135
141
init_pool
@@ -149,7 +155,6 @@ if [[ $TESTS_TO_RUN =~ "all" || $TESTS_TO_RUN =~ "cli" ]]; then
149
155
done
150
156
fi
151
157
152
-
153
158
# Go rest tests
154
159
if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " rest" ]]; then
155
160
GO_REST_TESTS=" $( find integration_tests/grpc_rest -type f -name ' *_test.go' ) "
@@ -177,33 +182,35 @@ if [[ $TESTS_TO_RUN =~ "all" || $TESTS_TO_RUN =~ "rest" ]]; then
177
182
fi
178
183
179
184
# Deploy tests
180
- if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " deploy" ]]; then
181
- DEPLOY_SHELL_TEST=" ./integration_tests/deploy/test_deploy.sh"
182
- if bash " $DEPLOY_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
183
- log " $DEPLOY_SHELL_TEST finished successfully"
184
- else
185
- log " $DEPLOY_SHELL_TEST failed"
186
- exit 1
187
- fi
188
- fi
185
+ if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " deploy" ]]; then
186
+ DEPLOY_SHELL_TEST=" ./integration_tests/deploy/test_deploy.sh"
187
+ if bash " $DEPLOY_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
188
+ log " $DEPLOY_SHELL_TEST finished successfully"
189
+ else
190
+ log " $DEPLOY_SHELL_TEST failed"
191
+ exit 1
192
+ fi
193
+ fi
189
194
190
195
# Upgrade procedure tests
191
196
if [[ $TESTS_TO_RUN =~ " all" || $TESTS_TO_RUN =~ " upgrade" ]]; then
192
- UPGRADE_SHELL_TESTS= $( find integration_tests/upgrade -type f -name ' *.sh ' -not -name " add-new-node-after-upgrade.sh " -not -name " common.sh " -not -name " test-upgrade-1.2-to-1.3. sh" | sort )
197
+ UPGRADE_SHELL_TEST= " ./ integration_tests/upgrade/ test-upgrade. sh"
193
198
194
- for UPGRADE_SHELL_TEST in ${UPGRADE_SHELL_TESTS} ; do
195
- log " *****************************************************************************************"
196
- log " Running $UPGRADE_SHELL_TEST "
197
- log " *****************************************************************************************"
199
+ init_pool yes localnet_init_latest_stable_release " v0.12.0"
198
200
199
- if bash " $UPGRADE_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
200
- log " $UPGRADE_SHELL_TEST finished successfully"
201
- else
202
- log " $UPGRADE_SHELL_TEST failed"
203
- exit 1
204
- fi
201
+ log " *****************************************************************************************"
202
+ log " Running $UPGRADE_SHELL_TEST "
203
+ log " *****************************************************************************************"
205
204
206
- cleanup_pool
207
- done
205
+ if bash " $UPGRADE_SHELL_TEST " & > ${DETAILED_OUTPUT_TARGET} ; then
206
+ rm dcld_mainnet_stable
207
+ log " $UPGRADE_SHELL_TEST finished successfully"
208
+ source integration_tests/upgrade/add-new-node-after-upgrade.sh
209
+ check_adding_new_node
210
+ else
211
+ log " $UPGRADE_SHELL_TEST failed"
212
+ exit 1
213
+ fi
208
214
215
+ cleanup_pool
209
216
fi
0 commit comments