Skip to content

Commit

Permalink
No screen, but lsof, no rpmorphan.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Mar 16, 2020
1 parent d017c73 commit 485df7a
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
[ "${status}" -eq 0 ]
}

@test "Logging in and install screen." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "dnf -y install screen"
@test "Logging in and install lsof." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "dnf -y install lsof"
[ "${status}" -eq 0 ]
}

@test "Logging in and using rpm to remove screen." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "rpm -e screen"
@test "Logging in and using rpm to remove lsof." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "rpm -e lsof"
[ "${status}" -eq 0 ]
}

Expand All @@ -33,16 +33,6 @@
[ "${status}" -eq 0 ]
}

@test "Installing rpmorphan." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "dnf -y install rpmorphan"
[ "${status}" -eq 0 ]
}

@test "Running rpmorphan." {
run ssh -i id_rsa.priv -o Port=2222 -o "StrictHostKeyChecking no" root@localhost "! rpmorphan | grep '[a-z]'"
[ "${status}" -eq 0 ]
}

@test "Killing the container with CTRL and C." {
run sudo kill -SIGINT $(docker inspect --format='{{.State.Pid}}' $(docker ps -ql))
[ "${status}" -eq 0 ]
Expand All @@ -56,4 +46,3 @@
result=$(docker ps | grep docker-centos-openssh | wc -l | bc)
[ "${result}" -eq 0 ]
}

0 comments on commit 485df7a

Please sign in to comment.