1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
juanfont.headscale/hscontrol/db
Kristoffer Dalby f6276ab9d2 fix postgres constraints, add postgres testing
This commit fixes the constraint syntax so it is both valid for
sqlite and postgres.

To validate this, I've added a new postgres testing library and a
helper that will spin up local postgres, setup a db and use it in
the constraints tests. This should also help testing db stuff in
the future.

postgres has been added to the nix dev shell and is now required
for running the unit tests.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-11-23 21:14:55 +01:00
..
testdata use gorm serialiser instead of custom hooks (#2156) 2024-10-02 11:41:58 +02:00
api_key_test.go
api_key.go
db_test.go fix postgres constraints, add postgres testing 2024-11-23 21:14:55 +01:00
db.go fix postgres constraints, add postgres testing 2024-11-23 21:14:55 +01:00
ip_test.go more linter fixups (#2212) 2024-11-22 15:54:58 +00:00
ip.go use tsaddr library and cleanups (#2150) 2024-10-02 09:06:09 +02:00
node_test.go fix postgres constraints, add postgres testing 2024-11-23 21:14:55 +01:00
node.go use userID instead of username everywhere 2024-11-23 21:14:55 +01:00
policy.go
preauth_keys_test.go use userID instead of username everywhere 2024-11-23 21:14:55 +01:00
preauth_keys.go use userID instead of username everywhere 2024-11-23 21:14:55 +01:00
routes_test.go use userID instead of username everywhere 2024-11-23 21:14:55 +01:00
routes.go nits 2024-11-23 21:14:55 +01:00
suite_test.go fix postgres constraints, add postgres testing 2024-11-23 21:14:55 +01:00
text_serialiser.go use gorm serialiser instead of custom hooks (#2156) 2024-10-02 11:41:58 +02:00
users_test.go fix nil in test 2024-11-23 21:14:55 +01:00
users.go fix constraints 2024-11-23 21:14:55 +01:00