|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
| 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 | +#/ |
3 | 28 | #/ This is script for testing vuh installation and auto updates mechanisms. |
4 | 29 |
|
5 | 30 | APP_NAME='run_tests.sh' |
@@ -173,16 +198,15 @@ function autoupdate_test() { |
173 | 198 | vuh -v || exit 1 |
174 | 199 | [ "$(vuh -v)" != '1.0.0' ] || exit 1 |
175 | 200 |
|
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 |
186 | 210 |
|
187 | 211 | _show_success_message "Autoupdate tests successfully finished." |
188 | 212 | } |
|
0 commit comments