Skip to content

Commit

Permalink
testsuite: fix invalid chars check, and image building
Browse files Browse the repository at this point in the history
* pass LOG_PANIC_ON_INVALIDCHARS env var to containers
* remove `profiles:` from container test because it made `docker compose build` counter-intuitive
* apiclient: fix log string
  • Loading branch information
altergui authored and p4u committed Oct 23, 2023
1 parent 9bdef4d commit e269d78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apiclient/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (c *HTTPclient) WaitUntilElectionStatus(ctx context.Context,
// WaitUntilElectionResults waits until the given election has published final results.
func (c *HTTPclient) WaitUntilElectionResults(ctx context.Context,
electionID types.HexBytes) (*api.ElectionResults, error) {
log.Infof("waiting for election %s to publish final results", electionID)
log.Infof("waiting for election %s to publish final results", electionID.String())
startTime := time.Now()
for {
election, err := c.ElectionResults(electionID)
Expand Down
9 changes: 7 additions & 2 deletions dockerfiles/testsuite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- gocoverage-seed:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

miner0:
image: "dvotenode:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -30,6 +31,7 @@ services:
- gocoverage-miner0:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

miner1:
image: "dvotenode:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -43,6 +45,7 @@ services:
- gocoverage-miner1:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

miner2:
image: "dvotenode:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -56,6 +59,7 @@ services:
- gocoverage-miner2:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

miner3:
image: "dvotenode:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -69,6 +73,7 @@ services:
- gocoverage-miner3:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

gateway0:
image: "dvotenode:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -84,6 +89,7 @@ services:
- gocoverage-gateway0:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS

test:
image: "dvotenode-test:${TESTSUITE_BUILD_TAG:-latest}"
Expand All @@ -98,9 +104,8 @@ services:
- gocoverage-test:/app/run/gocoverage
environment:
- GOCOVERDIR=/app/run/gocoverage
- LOG_PANIC_ON_INVALIDCHARS
command: "true"
profiles:
- tools # this container is only intended to be `docker compose run`, no need to start on `docker compose up`

gocoverage:
image: golang:1.21
Expand Down

0 comments on commit e269d78

Please sign in to comment.