-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test definition improvements Better argument parsing "generate" command Co-authored-by: Riccardo Sale <[email protected]>
- Loading branch information
Showing
21 changed files
with
787 additions
and
668 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
DockerFile | ||
bundle.dockerfile | ||
standalone.dockerfile | ||
.gitattributes | ||
.gitignore | ||
Readme.md | ||
|
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
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
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,33 +1,34 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build | ||
|
||
COPY ./src ./src | ||
RUN dotnet publish /src/qest/ -o /qest --runtime linux-x64 -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true | ||
RUN dotnet publish /src/qest/ -o /output --runtime linux-x64 -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true | ||
|
||
FROM mcr.microsoft.com/mssql/server:2019-latest AS mssql | ||
USER root | ||
|
||
# env vars needed by the mssql image | ||
ENV ACCEPT_EULA Y | ||
ENV SA_PASSWORD qestDbSecurePassword27! | ||
# | ||
#ENV DACPAC | ||
|
||
|
||
WORKDIR /qest | ||
COPY --from=build /qest/qest . | ||
WORKDIR /app | ||
COPY --from=build /output/ . | ||
|
||
RUN chmod a+x qest | ||
|
||
# sqlpackage | ||
RUN apt-get update \ | ||
&& apt-get install unzip -y | ||
|
||
RUN wget -O sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=2143497 | ||
RUN wget -O sqlpackage.zip https://aka.ms/sqlpackage-linux | ||
RUN unzip sqlpackage.zip | ||
RUN chmod a+x sqlpackage | ||
|
||
WORKDIR / | ||
|
||
# Launch SQL Server, confirm startup is complete, deploy the DACPAC, run tests. | ||
# See https://stackoverflow.com/a/51589787/488695 | ||
|
||
ENTRYPOINT ["sh", "-c", "( /opt/mssql/bin/sqlservr & ) | grep -q \"Service Broker manager has started\" \ | ||
&& ./sqlpackage /a:Publish /sf:db/${DACPAC}.dacpac /tsn:. /tdn:$DACPAC /tu:sa /tp:$SA_PASSWORD \ | ||
&& ./qest --folder tests --tcs \"Server=localhost,1433;Initial Catalog=${DACPAC};User Id=sa;Password=${SA_PASSWORD}\""] | ||
&& PATH='$PATH':/app \ | ||
&& sqlpackage /a:Publish /sf:db/${DACPAC}.dacpac /tsn:. /tdn:$DACPAC /tu:sa /tp:$SA_PASSWORD \ | ||
&& qest run --folder tests --tcs \"Server=localhost,1433;Initial Catalog=${DACPAC};User Id=sa;Password=${SA_PASSWORD}\""] |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.