ory / dockertest

Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=dockertest
Apache License 2.0
4.1k stars 243 forks source link

use defer instead of os.Exit(m.Run()) #493

Closed pmenglund closed 3 months ago

pmenglund commented 7 months ago

as of go1.15 testing.M returns the return code of m.Run(), so it is possible to use defer

Related Issue or Design Document

https://github.com/golang/go/issues/34129

Checklist

Further comments

n/a

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.

pmenglund commented 7 months ago

this fails on something unrelated to the PR:

Error: ../../../go/pkg/mod/github.com/docker/cli@v24.0.1+incompatible/cli/compose/template/template.go:242:14: undefined: strings.Cut

do you want me to fix the issue in this PR or a separate one?

alnr commented 3 months ago

This is a good improvement. Would you mind rebasing to get rid of the updated Copyright headers?

pmenglund commented 3 months ago

This is a good improvement. Would you mind rebasing to get rid of the updated Copyright headers?

Seems like you did this already. Let me know if there is anything else I should do...