fix: handle user metadata projection correctly (#4098)

This commit is contained in:
Livio Spring
2022-08-03 09:50:23 +02:00
committed by GitHub
parent 6b30be77e6
commit dba0fdcf7b
3 changed files with 20 additions and 20 deletions

View File

@@ -41,7 +41,7 @@ func TestUserMetadataProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPSERT INTO projections.user_metadata (user_id, resource_owner, instance_id, creation_date, change_date, sequence, key, value) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)",
expectedStmt: "UPSERT INTO projections.user_metadata2 (user_id, resource_owner, instance_id, creation_date, change_date, sequence, key, value) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)",
expectedArgs: []interface{}{
"agg-id",
"ro-id",
@@ -77,7 +77,7 @@ func TestUserMetadataProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "DELETE FROM projections.user_metadata WHERE (user_id = $1) AND (key = $2)",
expectedStmt: "DELETE FROM projections.user_metadata2 WHERE (user_id = $1) AND (key = $2)",
expectedArgs: []interface{}{
"agg-id",
"key",
@@ -105,7 +105,7 @@ func TestUserMetadataProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "DELETE FROM projections.user_metadata WHERE (user_id = $1)",
expectedStmt: "DELETE FROM projections.user_metadata2 WHERE (user_id = $1)",
expectedArgs: []interface{}{
"agg-id",
},
@@ -132,7 +132,7 @@ func TestUserMetadataProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "DELETE FROM projections.user_metadata WHERE (user_id = $1)",
expectedStmt: "DELETE FROM projections.user_metadata2 WHERE (user_id = $1)",
expectedArgs: []interface{}{
"agg-id",
},