fix: initial failures (#4291)

* fix(cmd): read configuration correctly

* fix(database): read weakly typed config

* fix(database): correct handling of update columns

Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
Silvan
2022-09-01 07:24:26 +00:00
committed by GitHub
co-authored by Livio Spring
parent 32b751a3a0
commit 2f647ce9a2
13 changed files with 164 additions and 48 deletions
+6 -6
View File
@@ -165,7 +165,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPDATE projections.login_names_users SET (user_name) = ($1) WHERE (id = $2)",
expectedStmt: "UPDATE projections.login_names_users SET user_name = $1 WHERE (id = $2)",
expectedArgs: []interface{}{
"changed",
"agg-id",
@@ -195,7 +195,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPDATE projections.login_names_users SET (user_name) = ($1) WHERE (id = $2)",
expectedStmt: "UPDATE projections.login_names_users SET user_name = $1 WHERE (id = $2)",
expectedArgs: []interface{}{
"claimed",
"agg-id",
@@ -257,7 +257,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPDATE projections.login_names_policies SET (must_be_domain) = ($1) WHERE (resource_owner = $2)",
expectedStmt: "UPDATE projections.login_names_policies SET must_be_domain = $1 WHERE (resource_owner = $2)",
expectedArgs: []interface{}{
false,
"ro-id",
@@ -395,7 +395,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPDATE projections.login_names_domains SET (is_primary) = ($1) WHERE (resource_owner = $2) AND (is_primary = $3)",
expectedStmt: "UPDATE projections.login_names_domains SET is_primary = $1 WHERE (resource_owner = $2) AND (is_primary = $3)",
expectedArgs: []interface{}{
false,
"ro-id",
@@ -403,7 +403,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
},
},
{
expectedStmt: "UPDATE projections.login_names_domains SET (is_primary) = ($1) WHERE (name = $2) AND (resource_owner = $3)",
expectedStmt: "UPDATE projections.login_names_domains SET is_primary = $1 WHERE (name = $2) AND (resource_owner = $3)",
expectedArgs: []interface{}{
true,
"primary",
@@ -466,7 +466,7 @@ func TestLoginNameProjection_reduces(t *testing.T) {
executer: &testExecuter{
executions: []execution{
{
expectedStmt: "UPDATE projections.login_names_policies SET (must_be_domain) = ($1) WHERE (resource_owner = $2)",
expectedStmt: "UPDATE projections.login_names_policies SET must_be_domain = $1 WHERE (resource_owner = $2)",
expectedArgs: []interface{}{
false,
"ro-id",