-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1583 from matthewrmshin/fix-ssh-messaging-pyro-fa…
…ll-through Fix SSH messaging fall through to Pyro
- Loading branch information
Showing
5 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2015 NIWA | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
#------------------------------------------------------------------------------- | ||
# Test "cylc message" in SSH mode, test needs to have compatible version | ||
# installed on the remote host. | ||
. "$(dirname "$0")/test_header" | ||
#------------------------------------------------------------------------------- | ||
CYLC_TEST_HOST="$(cylc get-global-config -i '[test battery]remote host')" | ||
if [[ -z "${CYLC_TEST_HOST}" ]]; then | ||
skip_all '[test battery]remote host: not defined' | ||
fi | ||
set_test_number 3 | ||
|
||
mkdir 'conf' | ||
cat >>'conf/global.rc' <<__GLOBAL_RC__ | ||
[hosts] | ||
[[${CYLC_TEST_HOST}]] | ||
task communication method = ssh | ||
__GLOBAL_RC__ | ||
export CYLC_CONF_PATH="${PWD}/conf" | ||
|
||
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}" | ||
# Note: Don't install passphrase on remote host. Message should only return via | ||
# SSH. | ||
|
||
run_ok "${TEST_NAME_BASE}-validate" \ | ||
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_HOST=${CYLC_TEST_HOST}" | ||
suite_run_ok "${TEST_NAME_BASE}-run" \ | ||
cylc run --debug --reference-test "${SUITE_NAME}" \ | ||
-s "CYLC_TEST_HOST=${CYLC_TEST_HOST}" | ||
|
||
run_fail "${TEST_NAME_BASE}-grep-DENIED-suite-log" \ | ||
grep -q "\\[client-connect\\] DENIED .*@${CYLC_TEST_HOST}:cylc-message" \ | ||
"$(cylc get-global-config --print-run-dir)/${SUITE_NAME}/log/suite/log" | ||
|
||
ssh -oBatchMode=yes -oConnectTimeout=5 "${CYLC_TEST_HOST}" \ | ||
"rm -rf '.cylc/${SUITE_NAME}' 'cylc-run/${SUITE_NAME}'" | ||
purge_suite "${SUITE_NAME}" | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
2015-08-26T10:10:10Z INFO - Run mode: live | ||
2015-08-26T10:10:10Z INFO - Initial point: 1 | ||
2015-08-26T10:10:10Z INFO - Final point: 1 | ||
2015-08-26T10:10:10Z INFO - Cold Start 1 | ||
2015-08-26T10:10:10Z INFO - [t0.1] -triggered off [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!jinja2 | ||
[cylc] | ||
UTC mode = True # Ignore DST | ||
[[reference test]] | ||
live mode suite timeout = PT1M | ||
|
||
[scheduling] | ||
[[dependencies]] | ||
graph=t0 | ||
|
||
[runtime] | ||
[[t0]] | ||
script = true | ||
[[[remote]]] | ||
host = {{CYLC_TEST_HOST}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../lib/bash/test_header |