mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-17 01:03:30 -04:00
"hostthatdoesnotexist" is not a hostname that is guaranteed to be unused, and on some systems a hostname without any dots causes an implicit search within various domain suffixes. There is no explicitly-specified rule for what error should be returned when suffix-based search fails, so different implementations handle that differently and this test was not written to tolerate those differences, causing false failures. The "invalid" top-level domain is reserved by RFC 6761 and required to always cause the NXDOMAIN error, which is the DNS error required to produce the error message this test expects. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
Run the integration tests:
container_id=$(docker run --rm --name opentofu-psql -p 5432:5432 -e POSTGRES_PASSWORD=tofu -d postgres)
TF_ACC=1 TF_PG_TEST=1 DATABASE_URL="postgresql://postgres:tofu@localhost:5432/postgres?sslmode=disable" \
go test github.com/opentofu/opentofu/internal/backend/remote-state/pg
docker rm ${container_id} -f