mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Implemented integration tests for --tls-san option
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
committed by
Jean-Laurent de Morlhon
parent
5b453e6305
commit
b82f9a8509
26
test/integration/certs-extra-san.bats
Normal file
26
test/integration/certs-extra-san.bats
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load helpers
|
||||
|
||||
export DRIVER=virtualbox
|
||||
export NAME="bats-$DRIVER-test"
|
||||
export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER
|
||||
|
||||
@test "$DRIVER: create" {
|
||||
run machine --tls-san foo.bar.tld --tls-san 10.42.42.42 create -d $DRIVER $NAME
|
||||
}
|
||||
|
||||
@test "$DRIVER: verify that server cert contains the extra SANs" {
|
||||
machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'DNS:foo.bar.tld'
|
||||
machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'IP Address:10.42.42.42'
|
||||
}
|
||||
|
||||
@test "$DRIVER: verify that server cert SANs are still there after 'regenerate-certs'" {
|
||||
machine regenerate-certs -f $NAME
|
||||
machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'DNS:foo.bar.tld'
|
||||
machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'IP Address:10.42.42.42'
|
||||
}
|
||||
|
||||
@test "cleanup" {
|
||||
machine rm $NAME
|
||||
}
|
||||
Reference in New Issue
Block a user