Skip to content

Commit

Permalink
remove tests to strace testscript
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Greggi <[email protected]>
  • Loading branch information
alegrey91 committed Aug 20, 2024
1 parent 2862975 commit 9bfebba
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions tests/strace.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,3 @@ stdout 'Usage:'

# remove all previously applied forwards
strace fwdctl delete --all

# test primarly subcommand 'create'
strace fwdctl create -d 3000 -s 127.0.0.1 -p 80 -i lo
fwd_exists lo tcp 3000 127.0.0.1 80

# compare table view
strace fwdctl list
cmp stdout list-table.txt

# compare json view
strace fwdctl list -o json
cmp stdout list-json.txt

# compare yaml view
strace fwdctl list -o yaml
cmp stdout list-yaml.txt

# check alias works
strace fwdctl ls

-- list-table.txt --
+--------+-----------+----------+---------------+-------------+---------------+
| NUMBER | INTERFACE | PROTOCOL | EXTERNAL PORT | INTERNAL IP | INTERNAL PORT |
+--------+-----------+----------+---------------+-------------+---------------+
| 1 | lo | tcp | 3000 | 127.0.0.1 | 80 |
+--------+-----------+----------+---------------+-------------+---------------+
-- list-json.txt --
{
"0be1c5f4141015ca6a8e873344da06e6": {
"iface": "lo",
"proto": "tcp",
"dport": 3000,
"saddr": "127.0.0.1",
"sport": 80
}
}
-- list-yaml.txt --
0be1c5f4141015ca6a8e873344da06e6:
iface: lo
proto: tcp
dport: 3000
saddr: 127.0.0.1
sport: 80

0 comments on commit 9bfebba

Please sign in to comment.