Skip to content

Commit

Permalink
Merge c8e6bc0 into 6b3a6d1
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Mar 9, 2021
2 parents 6b3a6d1 + c8e6bc0 commit 70e1f38
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 31 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/boulder-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ jobs:
- "docker-compose run --use-aliases boulder ./test.sh --integration"
# Config changes that have landed in main but not yet been applied to
# production can be made in boulder-config-next.json.
- "docker-compose run --use-aliases boulder ./test.sh --integration --config-next"
# Database migrations in `sa/_db-next/migrations` are only performed
# when `docker-compose` is called using the `bouldernext` alias
- "docker-compose run --use-aliases bouldernext ./test.sh --integration"
- "docker-compose run --use-aliases boulder ./test.sh --unit --enable-race-detection"
- "docker-compose run --use-aliases boulder ./test.sh --unit --enable-race-detection --config-next"
- "docker-compose run --use-aliases bouldernext ./test.sh --unit --enable-race-detection"
- "docker-compose run --use-aliases boulder ./test.sh --start-py"
# gomod-vendor runs with a separate network access definition
# because it needs to fetch packages from GitHub et. al., which
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ env:
- TESTFLAGS="--lints --integration --generate --rpm"
# Config changes that have landed in main but not yet been applied to
# production can be made in boulder-config-next.json.
- TESTFLAGS="--integration --config-next"
- TESTFLAGS="--integration" CONTAINER="bouldernext"
- TESTFLAGS="--unit --enable-race-detection"
- TESTFLAGS="--unit --enable-race-detection --config-next"
- TESTFLAGS="--unit --enable-race-detection" CONTAINER="bouldernext"
- TESTFLAGS="--start-py"
# gomod-vendor runs with a separate container because it needs to fetch
# packages from GitHub et. al., which is incompatible with the DNS server
Expand Down
24 changes: 15 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: '3'
services:
boulder:
boulder: &boulder_service
# To minimize fetching this should be the same version used below
image: letsencrypt/boulder-tools:${BOULDER_TOOLS_TAG:-go1.15.7_2021-02-25}
environment:
- FAKE_DNS=10.77.77.77
- BOULDER_CONFIG_DIR=test/config
- GOFLAGS=-mod=vendor
environment: &boulder_service_environment
FAKE_DNS: 10.77.77.77
BOULDER_CONFIG_DIR: test/config
GOFLAGS: -mod=vendor
# This is required so Python doesn't throw an error when printing
# non-ASCII to stdout.
- PYTHONIOENCODING=utf-8
PYTHONIOENCODING: utf-8
# These are variables you can set to affect what tests get run or
# how they are run. Including them here with no value means they are
# passed through from the environment.
- RUN
- INT_FILTER
- RACE
RUN: ""
INT_FILTER: ""
RACE: ""
volumes:
- .:/go/src/github.com/letsencrypt/boulder:cached
- ./.gocache:/root/.cache/go-build:cached
Expand Down Expand Up @@ -59,6 +59,11 @@ services:
- bmysql
entrypoint: test/entrypoint.sh
working_dir: /go/src/github.com/letsencrypt/boulder
bouldernext:
<<: *boulder_service
environment:
<<: *boulder_service_environment
BOULDER_CONFIG_DIR: test/config-next
bmysql:
image: mariadb:10.5
networks:
Expand All @@ -80,6 +85,7 @@ services:
environment:
GO111MODULE: "on"
GOFLAGS: "-mod=vendor"
BOULDER_CONFIG_DIR: test/config
networks:
- bluenet
volumes:
Expand Down
10 changes: 0 additions & 10 deletions sa/_db-next/dbconf.yml

This file was deleted.

1 change: 1 addition & 0 deletions sa/_db-next/dbconf.yml
1 change: 1 addition & 0 deletions sa/_db-next/migrations/19700101000000_CombinedSchema.sql
1 change: 0 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ fi
# Defaults
#
export RACE="false"
export BOULDER_CONFIG_DIR="test/config"
STAGE="starting"
STATUS="FAILURE"
RUN=()
Expand Down
10 changes: 3 additions & 7 deletions test/create_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ mysql $dbconn -e "SET GLOBAL max_connections = 500;"
for dbenv in $DBENVS; do
db="boulder_sa_${dbenv}"

if mysql $dbconn -e 'show databases;' | grep $db > /dev/null; then
echo "Database $db already exists - skipping create"
else
create_script="drop database if exists \`${db}\`; create database if not exists \`${db}\`;"
create_script="drop database if exists \`${db}\`; create database if not exists \`${db}\`;"

mysql $dbconn -e "$create_script" || die "unable to create ${db}"
mysql $dbconn -e "$create_script" || die "unable to create ${db}"

echo "created empty ${db} database"
fi
echo "created empty ${db} database"

goose -path=./sa/_db/ -env=$dbenv up || die "unable to migrate ${db} with ./sa/_db/"
echo "migrated ${db} database with ./sa/_db/"
Expand Down

0 comments on commit 70e1f38

Please sign in to comment.