Skip to content

Commit bafbc91

Browse files
authored
Merge pull request #39 from Greewil/tests
Added help for installer-tests runner script and added test for manual autoupdate
2 parents d0047b7 + 9a7a54f commit bafbc91

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

installer-tests/run_tests.sh

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
#!/usr/bin/env bash
22

3+
#/ Usage: ./run_tests.sh [-h | --help] [ds | docker-starter <test_command>] [it | installation-test] [at | autoupdate-test]
4+
#/
5+
#/ Standalone commands:
6+
#/ -h, --help show help text
7+
#/ ds | docker-starter <test_command>
8+
#/ to run tests script inside of Docker container.
9+
#/ It will run './run_tests.sh <test_command>', where <test_command> expected to be
10+
#/ "installation-test" or "autoupdate-test".
11+
#/ it | installation-test to run installation tests in current environment
12+
#/ at | autoupdate-test to run autoupdate tests in current environment
13+
#/
14+
#/ Arguments for running tests:
15+
#/ -q, --quiet
16+
#/ to show only information about passed and failed tests.
17+
#/ -t <test_id>, --test-id <test_id>
18+
#/ to run only test with specified <test_id>.
19+
#/ This parameter can't be used with '-tp | --test-id-prefix'.
20+
#/ This parameter can't be used with '-ft | --from-test-id'.
21+
#/ -ft <test_id>, --from-test-id <test_id>
22+
#/ to run tests listed after test with specified <test_id> (including).
23+
#/ This parameter can't be used with '-t | --test-id'.
24+
#/ -tp <test_id_prefix>, --test-id-prefix <test_id_prefix>
25+
#/ to run only tests with specified prefixes.
26+
#/ This parameter can't be used with '-t | --test-id'.
27+
#/
328
#/ This is script for testing vuh installation and auto updates mechanisms.
429

530
APP_NAME='run_tests.sh'
@@ -173,16 +198,15 @@ function autoupdate_test() {
173198
vuh -v || exit 1
174199
[ "$(vuh -v)" != '1.0.0' ] || exit 1
175200

176-
# TODO uncomment in next release
177-
# _show_updated_message "Trying to update vuh manually (when update not required) ..."
178-
# expecting_already_updated='you already have the latest vuh version'
179-
# vuh_update_output="$(vuh --update)" || exit 1
180-
# echo "vuh_update_output: $vuh_update_output"
181-
# if ! [[ $vuh_update_output =~ $expecting_already_updated ]]; then
182-
# _show_error_message "Update command failed!"
183-
# _show_error_message "$vuh_update_output"
184-
# exit 1
185-
# fi
201+
_show_updated_message "Trying to update vuh manually (when update not required) ..."
202+
expecting_already_updated='you already have the latest vuh version'
203+
vuh_update_output="$(vuh --update)" || exit 1
204+
echo "vuh_update_output: $vuh_update_output"
205+
if ! [[ $vuh_update_output =~ $expecting_already_updated ]]; then
206+
_show_error_message "Update command failed!"
207+
_show_error_message "$vuh_update_output"
208+
exit 1
209+
fi
186210

187211
_show_success_message "Autoupdate tests successfully finished."
188212
}

vuh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
# Written by Shishkin Sergey <[email protected]>
208208

209209
# Current vuh version
210-
VUH_VERSION='2.11.1'
210+
VUH_VERSION='2.11.2'
211211

212212
# Installation variables (Please don't modify!)
213213
DATA_DIR='<should_be_replace_after_installation:DATA_DIR>'

0 commit comments

Comments
 (0)