Debian Codegraph @

tests/f/remote/05-remote-init.t

raw
1 #!/usr/bin/env bash
2 # THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
3 # Copyright (C) NIWA & British Crown (Met Office) & Contributors.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #-------------------------------------------------------------------------------
18 # Test remote initialisation - when remote init fails for an install target,
19 # check other platforms with same install target can be initialised.
20
21 export REQUIRE_PLATFORM='loc:remote fs:indep comms:tcp'
22 . "$(dirname "$0")/test_header"
23 #-------------------------------------------------------------------------------
24 set_test_number 5
25 create_test_global_config "" "
26 [platforms]
27 [[belle]]
28 hosts = ${CYLC_TEST_HOST}
29 install target = ${CYLC_TEST_INSTALL_TARGET}
30 ssh command = garbage
31 "
32
33 #-------------------------------------------------------------------------------
34 install_workflow
35
36 run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"
37
38 workflow_run_fail "${TEST_NAME_BASE}-run" \
39 cylc play --debug --no-detach "${WORKFLOW_NAME}"
40
41 NAME='select-task-jobs.out'
42 DB_FILE="${WORKFLOW_RUN_DIR}/log/db"
43 sqlite3 "${DB_FILE}" \
44 'SELECT name, submit_status, run_status, platform_name
45 FROM task_jobs ORDER BY name' \
46 >"${NAME}"
47 cmp_ok "${NAME}" <<__SELECT__
48 a|1||belle
49 b|1||belle
50 e|0|0|${CYLC_TEST_PLATFORM}
51 f|0|0|${CYLC_TEST_PLATFORM}
52 g|0|0|localhost
53 __SELECT__
54
55 grep_ok "ERROR - Incomplete tasks:" "${TEST_NAME_BASE}-run.stderr"
56 grep_ok "1/a did not complete the required outputs" "${TEST_NAME_BASE}-run.stderr"
57
58 purge
59 exit