Attempt to test using bats / drone
This commit is contained in:
parent
16a09887e6
commit
9d22797dc8
@ -8,6 +8,12 @@ steps:
|
|||||||
- apt update
|
- apt update
|
||||||
- apt install -y shellcheck
|
- apt install -y shellcheck
|
||||||
- shellcheck abra script.d/*
|
- shellcheck abra script.d/*
|
||||||
|
- name: test
|
||||||
|
image: debian:buster
|
||||||
|
commands:
|
||||||
|
- apt update
|
||||||
|
- apt install -y bats docker
|
||||||
|
- bats test.bats
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
15
test.bats
Normal file
15
test.bats
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
|
@test "docker is available" {
|
||||||
|
command -v docker
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "abra is executable" {
|
||||||
|
abra --help
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "abra server add/rm works" {
|
||||||
|
abra server add swarm.example.com user 222
|
||||||
|
docker context ls | grep swarm.example.com
|
||||||
|
abra server rm swarm.example.com
|
||||||
|
}
|
Reference in New Issue
Block a user