From 310d04065e65dc759e63b4d06784ecd4d2507652 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 5 Feb 2024 21:40:21 +0100 Subject: [PATCH] test: Make failing loadtest fixtures pass again 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. --- test/load/fixtures.sql | 2 +- test/load/targets.http | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/load/fixtures.sql b/test/load/fixtures.sql index 72cf1e3ec3..eee7dfab58 100644 --- a/test/load/fixtures.sql +++ b/test/load/fixtures.sql @@ -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, diff --git a/test/load/targets.http b/test/load/targets.http index 0a242fed4f..ce65472a70 100644 --- a/test/load/targets.http +++ b/test/load/targets.http @@ -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