Skip to content

Commit

Permalink
test: Make failing loadtest fixtures pass again
Browse files Browse the repository at this point in the history
PR #2358 added a bulk insert to the loadtest. However this broke the regular insert test,
which just returned 400 Bad Request because of a missing PK value since. Adding the new
id column in the payload to the ?columns= argument fixes that.
  • Loading branch information
wolfgangwalther committed Feb 5, 2024
1 parent 63ff6d1 commit 310d040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/load/fixtures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INSERT INTO test.actors VALUES (1, 'John Doe');

-- POST target needs generated PK
CREATE TABLE test.films (
id INT PRIMARY KEY,
id INT PRIMARY KEY,
title TEXT,
year TEXT,
runtime TEXT,
Expand Down
2 changes: 1 addition & 1 deletion test/load/targets.http
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Prefer: tx=commit
GET http://postgrest/actors?select=*,roles(*,films(*))
Prefer: tx=commit

POST http://postgrest/films?columns=title
POST http://postgrest/films?columns=id,title
Prefer: tx=rollback
@post.json

Expand Down

0 comments on commit 310d040

Please sign in to comment.