Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
agent
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simmctic
agent
Commits
35389266
There was a problem fetching the pipeline summary.
Commit
35389266
authored
7 years ago
by
Rafael S Castilho
Browse files
Options
Downloads
Patches
Plain Diff
added more tests to testing
Signed-off-by:
Rafael S Castilho
<
rsc15@inf.ufpr.br
>
parent
e57b02d2
No related branches found
Branches containing commit
No related tags found
2 merge requests
!51
Merge development to master
,
!47
Issue/72
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/returnTest.bats
+40
-0
40 additions, 0 deletions
test/returnTest.bats
with
40 additions
and
0 deletions
test/returnTest.bats
+
40
−
0
View file @
35389266
...
...
@@ -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 ]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment