generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cb55ad
commit 1daf47d
Showing
8 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//go:build integration | ||
|
||
package sql_test | ||
|
||
import ( | ||
"testing" | ||
|
||
in "github.com/TBD54566975/ftl/integration" | ||
) | ||
|
||
func TestDatabase(t *testing.T) { | ||
in.Run(t, "database/ftl-project.toml", | ||
// deploy real module against "testdb" | ||
in.CopyModule("database"), | ||
in.CreateDBAction("database", "testdb", false), | ||
in.Deploy("database"), | ||
in.Call("database", "insert", in.Obj{"data": "hello"}, nil), | ||
in.QueryRow("testdb", "SELECT data FROM requests", "hello"), | ||
|
||
// run tests which should only affect "testdb_test" | ||
in.CreateDBAction("database", "testdb", true), | ||
in.ExecModuleTest("database"), | ||
in.QueryRow("testdb", "SELECT data FROM requests", "hello"), | ||
) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters