ssh-mjru.bats 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @test "invoke logout command over ssh on sw2-dh507.intr" {
  2. skip
  3. run timeout 30 sshpass -p"$(pass show majordomo/private/ssh/router)" ssh -F test-tmp/config -o ControlPath=none sw2-dh507.intr -- logout
  4. [ "$status" -eq 0 ]
  5. }
  6. @test "invoke logout command over ssh on sw2-dh508.intr" {
  7. run timeout 30 sshpass -p"$(pass show majordomo/private/ssh/router)" ssh -F test-tmp/config -o ControlPath=none sw2-dh508.intr -- logout
  8. [ "$status" -eq 0 ]
  9. }
  10. @test "invoke id command over ssh on br1-mr14.intr" {
  11. run timeout 30 sshpass -p"$(pass show majordomo/private/ssh/router)" ssh -F test-tmp/config -o ControlPath=none br1-mr14.intr -- id
  12. [ "$status" -eq 0 ]
  13. [[ "$output" == *uid=0* ]]
  14. }
  15. @test "invoke id command over ssh on sr1-dh507-508.intr" {
  16. run timeout 30 sshpass -p"$(pass show majordomo/private/ssh/router)" ssh -F test-tmp/config -o ControlPath=none sr1-dh507-508.intr -- id
  17. [ "$status" -eq 0 ]
  18. [[ "$output" == *uid=0* ]]
  19. }
  20. @test "invoke id command over ssh on web30" {
  21. run timeout 30 ssh -F test-tmp/config -o ControlPath=none web30.intr id
  22. [ "$status" -eq 0 ]
  23. [[ "$output" == *uid=1000* ]]
  24. }
  25. @test "invoke id command over ssh on galera-backup.intr" {
  26. run timeout 30 ssh -F test-tmp/config -o ControlPath=none galera-backup.intr id
  27. [ "$status" -eq 0 ]
  28. [[ "$output" == *uid=1000* ]]
  29. }
  30. @test "invoke id command over ssh on malscan.intr" {
  31. run timeout 30 ssh -F test-tmp/config -o ControlPath=none malscan.intr id
  32. [ "$status" -eq 0 ]
  33. [[ "$output" == *uid=* ]]
  34. }
  35. @test "invoke id command over ssh on vman.intr" {
  36. run timeout 30 ssh -F test-tmp/config -o ControlPath=none vman.intr id
  37. [ "$status" -eq 0 ]
  38. [[ "$output" == *uid=* ]]
  39. }
  40. @test "invoke id command over ssh on mjdev.intr" {
  41. run timeout 30 sshpass -p"$(pass show majordomo/public/mjdev.intr/root)" ssh -F test-tmp/config -o ControlPath=none mjdev.intr id
  42. [ "$status" -eq 0 ]
  43. [[ "$output" == *uid=* ]]
  44. }