Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade tests/system.bats with more tests (fixes #2219) #2220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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