From 7736a54e4819b19e21d518a7c230fedfc719dfb6 Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Fri, 22 Dec 2023 17:18:37 -0300 Subject: [PATCH 1/4] fix: test repository tenant_id query --- server/test/test_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/test/test_repository.go b/server/test/test_repository.go index 633507c533..d1361f0521 100644 --- a/server/test/test_repository.go +++ b/server/test/test_repository.go @@ -85,7 +85,7 @@ const ( ) as ltr ON ltr.test_id = t.id AND ltr.tenant_id = t.tenant_id LEFT OUTER JOIN test_runs last_test_run - ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id + ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id AND last_test_run.tenant_id = ltr.tenant_id ` testMaxVersionQuery = ` From 5541de765b7a96d8881542988dfd0aa74e44861e Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Fri, 22 Dec 2023 18:23:00 -0300 Subject: [PATCH 2/4] omitting logs from cypress e2e tests --- run.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/run.sh b/run.sh index 4c92fd06af..f45d3dd8de 100755 --- a/run.sh +++ b/run.sh @@ -53,10 +53,8 @@ stop() { } cypress-ci() { - echo "Running cypress" - export CYPRESS_BASE_URL=http://localhost:11633 export POKEMON_HTTP_ENDPOINT=http://demo-api:8081 @@ -65,10 +63,8 @@ cypress-ci() { } cypress() { - echo "Running cypress" - export CYPRESS_BASE_URL=http://localhost:11633 export POKEMON_HTTP_ENDPOINT=http://demo-api:8081 From 48cc856640708451c6b7c0ba54dec0ad57540159 Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Fri, 22 Dec 2023 18:52:29 -0300 Subject: [PATCH 3/4] wip --- server/test/test_repository.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/test/test_repository.go b/server/test/test_repository.go index d1361f0521..2459d852b7 100644 --- a/server/test/test_repository.go +++ b/server/test/test_repository.go @@ -85,8 +85,9 @@ const ( ) as ltr ON ltr.test_id = t.id AND ltr.tenant_id = t.tenant_id LEFT OUTER JOIN test_runs last_test_run - ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id AND last_test_run.tenant_id = ltr.tenant_id + ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id ` + // ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id AND last_test_run.tenant_id = ltr.tenant_id testMaxVersionQuery = ` INNER JOIN ( From 27a5c58cd995237a220e4c570a6f68b7fbe2ed1e Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Wed, 27 Dec 2023 17:26:41 -0300 Subject: [PATCH 4/4] added tenant_id check on get test sql to avoid cartesian products --- server/test/test_repository.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/test/test_repository.go b/server/test/test_repository.go index 2459d852b7..f5b5c6e707 100644 --- a/server/test/test_repository.go +++ b/server/test/test_repository.go @@ -85,9 +85,8 @@ const ( ) as ltr ON ltr.test_id = t.id AND ltr.tenant_id = t.tenant_id LEFT OUTER JOIN test_runs last_test_run - ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id + ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id AND last_test_run.tenant_id = ltr.tenant_id ` - // ON last_test_run.test_id = ltr.test_id AND last_test_run.id = ltr.id AND last_test_run.tenant_id = ltr.tenant_id testMaxVersionQuery = ` INNER JOIN (