From 873f4e08139b68245974c4e05887f4f82cb47b32 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Fri, 12 Jan 2024 16:19:58 -0800 Subject: [PATCH] wip --- integration/integration_test.go | 4 ++-- integration/testdata/database/DbTest.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integration/integration_test.go b/integration/integration_test.go index 113c6a9159..912ec07b7b 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -96,7 +96,7 @@ func TestIntegration(t *testing.T) { {name: "UseKotlinDbConn", assertions: assertions{ setUpModuleDb(filepath.Join(modulesDir, "ftl-module-echo3")), run(".", "ftl", "deploy", filepath.Join(modulesDir, "ftl-module-echo3")), - call("dbtest", "create", obj{"data": "Hello"}, func(t testing.TB, resp obj) {}), + call("echo", "db", obj{"data": "Hello"}, func(t testing.TB, resp obj) {}), validateModuleDb(), }}, {name: "SchemaGenerateJS", assertions: assertions{ @@ -231,7 +231,7 @@ func call[Resp any](module, verb string, req obj, onResponse func(t testing.TB, } func setUpModuleDb(dir string) assertion { - os.Setenv("FTL_POSTGRES_DSN_dbtest_testdb", "postgres://postgres:secret@localhost:54320/testdb?sslmode=disable") + os.Setenv("FTL_POSTGRES_DSN_echo_testdb", "postgres://postgres:secret@localhost:54320/testdb?sslmode=disable") return func(t testing.TB, ic itContext) error { db, err := sql.Open("pgx", "postgres://postgres:secret@localhost:54320/ftl?sslmode=disable") assert.NoError(t, err) diff --git a/integration/testdata/database/DbTest.kt b/integration/testdata/database/DbTest.kt index cc074307e5..220d97ee7f 100644 --- a/integration/testdata/database/DbTest.kt +++ b/integration/testdata/database/DbTest.kt @@ -1,4 +1,4 @@ -package ftl.dbtest +package ftl.echo import xyz.block.ftl.Context import xyz.block.ftl.Verb @@ -11,7 +11,7 @@ val db = Database("testdb") class DbTest { @Verb - fun create(context: Context, req: DbRequest): DbResponse { + fun db(context: Context, req: DbRequest): DbResponse { persistRequest(req) return DbResponse() }