-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomerstest enhancementNew test functionality or coverageNew test functionality or coverage
Description
We have some integration tests that exercise the database against a PostgreSQL container. You can run the tests using make test-database-integration, but it output errors from the test run which may be expected in some cases.
$ make test-database-integration
./utils/run_integration_tests.sh
bee7471d05e40be7a0ab26deca7bd64dca72d093714f2aaed90aef83ddcbb49c
=== RUN TestInsertSubjectSucceeds
--- PASS: TestInsertSubjectSucceeds (0.06s)
=== RUN TestInsertSubjectWithLongNameFails
2022/07/21 09:08:57 /home/lbragstad/go/src/github.com/rhmdnd/compserv/tests/integration/integration_test.go:139 ERROR: value too long for type character varying(255) (SQLSTATE 22001)
[0.906ms] [rows:0] INSERT INTO "subjects" ("id","name","type") VALUES ('da11af30-4d1c-4306-8290-c8659ef848f2','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','d7d37501-6e5a-4f87-8969-36e772f07a05')
--- PASS: TestInsertSubjectWithLongNameFails (0.05s)
=== RUN TestInsertSubjectWithNonUUIDFails
2022/07/21 09:08:58 /home/lbragstad/go/src/github.com/rhmdnd/compserv/tests/integration/integration_test.go:159 ERROR: invalid input syntax for type uuid: "1" (SQLSTATE 22P02)
[0.889ms] [rows:0] INSERT INTO "subjects" ("id","name","type") VALUES ('1','cluster.example.com','fe34d9e8-4d82-4faa-bd24-baed724318a1')
ERROR: invalid input syntax for type uuid: "1" (SQLSTATE 22P02)--- PASS: TestInsertSubjectWithNonUUIDFails (0.07s)
=== RUN TestInsertSubjectWithLongTypeFails
2022/07/21 09:08:58 /home/lbragstad/go/src/github.com/rhmdnd/compserv/tests/integration/integration_test.go:181 ERROR: value too long for type character varying(50) (SQLSTATE 22001)
[0.976ms] [rows:0] INSERT INTO "subjects" ("id","name","type") VALUES ('f200a9f9-65d2-4b4c-96bc-cec5ba745ec2','cluster.example.com','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
--- PASS: TestInsertSubjectWithLongTypeFails (0.07s)
=== RUN TestMigration
--- PASS: TestMigration (0.05s)
PASS
ok github.com/rhmdnd/compserv/tests/integration 0.314s
postgres
bee7471d05e40be7a0ab26deca7bd64dca72d093714f2aaed90aef83ddcbb49c
Can we explore ways to make this cleaner?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerstest enhancementNew test functionality or coverageNew test functionality or coverage