Skip to content

Commit

Permalink
upgrade tests/system.bats with more tests (fixes #2219)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Apr 26, 2021
1 parent d8ba03f commit edd854a
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions tests/system.bats
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,46 @@ load test-helper

@test "$clinom system" {
run "${clicmd}" system
assert_success && assert_output -p 'CPU'
assert_success && assert_output -p 'CPU:' \
&& assert_output -p "Memory:" \
&& assert_output -p "Disk storage:" \
&& assert_output -p "Volt:" \
&& assert_output -p "Temperature:" \
&& assert_output -p "CPU HEAVY TASKS" \
&& assert_output -p "RAM HEAVY TASKS"
}

@test "$clinom system all" {
run "${clicmd}" system all
assert_success && assert_output -p 'CPU'
assert_success && assert_output -p 'CPU:' \
&& assert_output -p "Memory:" \
&& assert_output -p "Disk storage:" \
&& assert_output -p "Volt:" \
&& assert_output -p "Temperature:" \
&& assert_output -p "CPU HEAVY TASKS" \
&& assert_output -p "RAM HEAVY TASKS"
}

@test "$clinom system volt" {
run "${clicmd}" system volt
assert_success && assert_output -p 'Volt'
assert_success && assert_output -p 'Volt:'
}

@test "$clinom system disk temperature" {
run "${clicmd}" system disk temperature
assert_success && assert_output -p 'Disk' && assert_output -p 'Temperature'
assert_success && assert_output -p 'Disk storage:' && assert_output -p 'Temperature:'
}

@test "$clinom system cputask" {
run "${clicmd}" system cputask
assert_success && assert_output -p 'CPU HEAVY TASKS'
}

@test "$clinom system ramtask" {
run "${clicmd}" system ramtask
assert_success && assert_output -p 'RAM HEAVY TASKS'
}

@test "$clinom system error" {
run "${clicmd}" system bruh lol
assert_output -p 'Error'
Expand Down

0 comments on commit edd854a

Please sign in to comment.