Skip to content

Commit

Permalink
fix(tests): don't double quote '~'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvisa committed Nov 17, 2020
1 parent 8592330 commit 40e1d9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/tiup-cluster/script/cmd_subtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ function cmd_subtest() {

! tiup-cluster $client _test $name data

cp "~/.tiup/storage/cluster/$name/ssh/id_rsa" "/tmp/$name.id_rsa"
cp ~/.tiup/storage/cluster/$name/ssh/id_rsa "/tmp/$name.id_rsa"
tiup-cluster $client --yes destroy $name

# after destroy the cluster, the public key should be deleted
! ssh -i "/tmp/$name.id_rsa" tidb@$ipprefix.101 "ls"
! ssh -o "PasswordAuthentication=no" -i "/tmp/$name.id_rsa" tidb@$ipprefix.101 "ls"
unlink "/tmp/$name.id_rsa"
}
4 changes: 2 additions & 2 deletions tests/tiup-dm/test_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ yes | tiup-dm scale-out $name $topo_worker
tiup-dm notfound-command 2>&1 | grep $HOME/.tiup/logs/tiup-dm-debug
TIUP_LOG_PATH=/tmp/a/b tiup-dm notfound-command 2>&1 | grep /tmp/a/b/tiup-dm-debug

cp "~/.tiup/storage/dm/clusters/$name/ssh/id_rsa" "/tmp/$name.id_rsa"
cp ~/.tiup/storage/dm/clusters/$name/ssh/id_rsa "/tmp/$name.id_rsa"
tiup-dm --yes destroy $name

# after destroy the cluster, the public key should be deleted
! ssh -i "/tmp/$name.id_rsa" tidb@$ipprefix.102 "ls"
! ssh -o "PasswordAuthentication=no" -i "/tmp/$name.id_rsa" tidb@$ipprefix.102 "ls"
unlink "/tmp/$name.id_rsa"

0 comments on commit 40e1d9a

Please sign in to comment.