Browse Source

Start testing environment

pull/340/head
Dan Schaper 8 years ago
parent
commit
79f442e456
No known key found for this signature in database GPG Key ID: FFF1A1AD0113C344
2 changed files with 29 additions and 0 deletions
  1. +18
    -0
      docker-compose.yml
  2. +11
    -0
      test/bats.sh

+ 18
- 0
docker-compose.yml View File

@ -0,0 +1,18 @@
version: '2'
services:
development:
build:
context: .
volumes:
- .:/opt/src/getssld
- /tmp/testing:/ssl
entrypoint: /bin/ash
bats:
build:
context: ../../bats-core/
image: bats:latest
volumes:
- .:/code
command: /code/test/bats.sh

+ 11
- 0
test/bats.sh View File

@ -0,0 +1,11 @@
#!/usr/bin/env bats
@test "addition using bc" {
result="$(echo 2+2 | bc)"
[ "$result" -eq 4 ]
}
@test "addition using dc" {
result="$(echo 2 2+p | dc)"
[ "$result" -eq 4 ]
}

Loading…
Cancel
Save