Skip to content

Commit

Permalink
Test to see if the UI runs - very rudimentary.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcla committed Jun 27, 2020
1 parent 60727e2 commit 207b1e5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/simple-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ echo Installing termshark for test use.

go install ./...

env

echo Making a test pcap.

cat <<EOF | xxd -r -p > /tmp/test.pcap
Expand Down Expand Up @@ -46,4 +44,15 @@ echo Running termshark.

$GOPATH/bin/termshark -r /tmp/test.pcap | grep 192.168.44.123

echo Running basic UI tests.

# Load a pcap, quit
{ sleep 5s ; echo q ; echo ; } | \
socat - EXEC:"sh -c \\\"stty rows 50 cols 80 && TERM=xterm $GOPATH/bin/termshark -r /tmp/test.pcap\\\"",pty,setsid,ctty

# Load a pcap, very rudimentary scrape for an IP, quit
{ sleep 5s ; echo q ; echo ; } | \
socat - EXEC:"sh -c \\\"stty rows 50 cols 80 && TERM=xterm $GOPATH/bin/termshark -r /tmp/test.pcap\\\"",pty,setsid,ctty | \
grep -a 192.168.44.123 > /dev/null

echo Tests were successful.

0 comments on commit 207b1e5

Please sign in to comment.