Skip to content
Snippets Groups Projects
Commit 35389266 authored by Rafael S Castilho's avatar Rafael S Castilho
Browse files

added more tests to testing


Signed-off-by: default avatarRafael S Castilho <rsc15@inf.ufpr.br>
parent e57b02d2
No related branches found
No related tags found
2 merge requests!51Merge development to master,!47Issue/72
Pipeline #
......@@ -43,6 +43,26 @@ function processor() {
[[ "$obj" != "null" ]]
}
function bytes_recived() {
obj=$(cat net.json | jq -r '.data_net.bytes_recived')
[[ "$obj" -ge 0 ]]
}
function bytes_transmited() {
obj=$(cat net.json | jq -r '.data_net.bytes_transmited')
[[ "$obj" -ge 0 ]]
}
function packets_recived() {
obj=$(cat net.json | jq -r '.data_net.packets_recived')
[[ "$obj" -ge 0 ]]
}
function packets_transmited() {
obj=$(cat net.json | jq -r '.data_net.packets_transmited')
[[ "$obj" -ge 0 ]]
}
setup() {
./../bin/agent.run --quiet | head -n -1 > export.json
pt1=$(cat export.json | head -n -9)
......@@ -61,6 +81,26 @@ teardown() {
rm -f net.json
}
@test "Bytes Recived" {
run bytes_recived
[ "$status" -eq 0 ]
}
@test "Bytes Transmited" {
run bytes_transmited
[ "$status" -eq 0 ]
}
@test "Packets Recived" {
run packets_recived
[ "$status" -eq 0 ]
}
@test "Packets Trasmited" {
run packets_transmited
[ "$status" -eq 0 ]
}
@test "Amount Users" {
run amount_users
[ "$status" -eq 0 ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment