-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e43686d
commit 6ebd23f
Showing
5 changed files
with
33 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-o StrictHostKeyChecking=no | ||
; exit 0 |
17 changes: 16 additions & 1 deletion
17
packages/sshnoports/test/end2end_tests/contexts/sshnp/entrypoint.sh
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 |
---|---|---|
@@ -1,3 +1,18 @@ | ||
#!/bin/bash | ||
sleep 2 | ||
~/.local/bin/sshnp -f @jeremy_0 -t @smoothalligator -d docker -h @rv_am -s id_ed25519.pub -v | ||
~/.local/bin/sshnp -f @jeremy_0 -t @smoothalligator -d sad -h @rv_am -s id_ed25519.pub -v > logs.txt | ||
cat logs.txt | ||
tail -n 5 logs.txt | grep "ssh -p" > command.txt | ||
|
||
# if command.txt is empty, exit 1 | ||
if [ ! -s command.txt ] | ||
then | ||
echo "command.txt is empty" | ||
tail -n 1 logs.txt || echo | ||
exit 1 | ||
fi | ||
|
||
echo " -o StrictHostKeyChecking=no " >> command.txt ; | ||
echo " -tt " >> command.txt ; | ||
echo "sh test.sh && exit" | $(cat command.txt) | ||
exit |
3 changes: 2 additions & 1 deletion
3
packages/sshnoports/test/end2end_tests/contexts/sshnpd/entrypoint.sh
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
~/.local/bin/sshnpd -a @smoothalligator -m @jeremy_0 -d docker -s -u -v | ||
echo "Test Passed" > test.txt | ||
~/.local/bin/sshnpd -a @smoothalligator -m @jeremy_0 -d sad -s -u -v |
11 changes: 11 additions & 0 deletions
11
packages/sshnoports/test/end2end_tests/contexts/sshnpd/test.sh
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,11 @@ | ||
#!/bin/bash | ||
# this is script is meant to be run by the sshnp container. | ||
# cat test.txt and check if "test passed" exit 0, otherwise exit 1 | ||
cat test.txt | grep "Test Passed" | ||
if [ $? -eq 0 ] | ||
then | ||
echo "Test Passed" | ||
exit 0 | ||
fi | ||
echo "Test Failed" | ||
exit 1 |
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