PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/t0005-rcmd_type-and-user.sh

https://code.google.com/
Shell | 25 lines | 21 code | 3 blank | 1 comment | 0 complexity | a9d0fc4bdc75b8bf8a025f578cf521aa MD5 | raw file
 1#!/bin/sh
 2
 3test_description='pdsh rcmd_type and remote user handling'
 4
 5. ${srcdir:-.}/test-lib.sh
 6
 7test_expect_success 'pdsh -l sets username for all hosts' '
 8	pdsh -S -Rexec -lbar -w foo[1-100] test "%u" = bar
 9'
10test_expect_success 'Can set remote username via user@hosts' '
11	pdsh -S -Rexec -w bar@foo[1-100] test "%u" = bar
12'
13test_expect_success 'user@hosts works for a subset of hosts' '
14	pdsh -S -Rexec -w u1@foo,u2@bar sh -c \
15		"if test %h = foo; then test %u = u1; else test %u = u2; fi"
16'
17test_expect_success 'Can set rcmd_type via rcmd_type:hosts' '
18    PDSH_RCMD_TYPE=ssh
19	pdsh -S -w exec:foo[1-10] true
20'
21test_expect_success 'Can set rcmd_type and user via rcmd_type:user@hosts' '
22    PDSH_RCMD_TYPE=ssh
23	pdsh -S -w exec:bar@foo[1-10] test "%u" = bar
24'
25test_done