Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds baseline IT tests for different versions of MSSQL servers
This test extends the MSSQL integration tests by adding test for running the existing test suite against the following MSSQL server versions: - 2019-latest - 2017-CU1-ubuntu in addition to the `2017-latest` version that is used in the existing test. Addresses serverless-broker Issue #1017.
- Loading branch information
diverdane
committed
Dec 18, 2019
1 parent
591eeac
commit 1af493c
Showing
11 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash -ex | ||
|
||
./start -d |
5 changes: 5 additions & 0 deletions
5
test/connector/tcp/mssql/server-2017-CU1/docker-compose.override.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: '3.0' | ||
|
||
services: | ||
mssql: | ||
image: mcr.microsoft.com/mssql/server:2017-CU1-ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash -ex | ||
|
||
dev_mode_flag= | ||
while getopts ":d" opt; do | ||
case $opt in | ||
d) dev_mode_flag="-d";; | ||
*) echo "Unknown option -$OPTARG"; exit 1;; | ||
esac | ||
done | ||
|
||
save_dir=$(pwd) | ||
cd .. | ||
./start -f $save_dir/docker-compose.override.yml $dev_mode_flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -ex | ||
|
||
cd .. | ||
./stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -ex | ||
|
||
cd .. | ||
./test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash -ex | ||
|
||
./start -d |
5 changes: 5 additions & 0 deletions
5
test/connector/tcp/mssql/server-2019/docker-compose.override.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: '3.0' | ||
|
||
services: | ||
mssql: | ||
image: mcr.microsoft.com/mssql/server:2019-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash -ex | ||
|
||
dev_mode_flag= | ||
while getopts ":d" opt; do | ||
case $opt in | ||
d) dev_mode_flag="-d";; | ||
*) echo "Unknown option -$OPTARG"; exit 1;; | ||
esac | ||
done | ||
|
||
save_dir=$(pwd) | ||
cd .. | ||
./start -f $save_dir/docker-compose.override.yml $dev_mode_flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -ex | ||
|
||
cd .. | ||
./stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -ex | ||
|
||
cd .. | ||
./test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
#!/bin/bash -ex | ||
|
||
SECRETLESS_HOST=secretless | ||
while getopts :d opt; do | ||
secretless_host="secretless" | ||
while getopts ":df:h" opt; do | ||
case $opt in | ||
d) SECRETLESS_HOST=secretless-dev;; | ||
\?) echo "Unknown option -$OPTARG"; exit 1;; | ||
d) secretless_host="secretless-dev";; | ||
f) docker_override_file=${OPTARG};; | ||
h) help_and_exit 0;; | ||
*) echo "Unknown option -$OPTARG"; exit 1;; | ||
esac | ||
done | ||
if [ -n "$docker_override_file" ]; then | ||
override_args="-f $docker_override_file" | ||
fi | ||
|
||
help_and_exit() { | ||
local retval=${1:-1} | ||
cat <<EOF | ||
This script starts up an MSSQL server container and a secretless | ||
broker container. | ||
Options: | ||
-d Run in development mode. | ||
-f <docker-compose-override-file> | ||
Docker compose override file. | ||
-h Show this command usage | ||
EOF | ||
exit "$retval" | ||
} | ||
|
||
./stop | ||
|
||
# the order of the services is important. mssql must be up before we start secretless | ||
docker-compose up -d mssql | ||
docker-compose -f docker-compose.yml $override_args up -d mssql | ||
|
||
time ./wait_for_mssql | ||
docker-compose logs mssql | ||
|
||
docker-compose up -d $SECRETLESS_HOST | ||
docker-compose up -d $secretless_host |