-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: parameterize integration tests #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome Lizzy, thanks so much for doing this!
Now that you've separated the tests, we should run every integration test as parallel jobs in CI. We'll need a way to list the tests. What I have done in the past is to just grep out the test functions like grep '^func Test' | awk '{print $2}' | cut -d'(' -f1
. I think you'll need to push this into a GHA variable, and reference it in a matrix of (language, test), if that's possible.
t.moduleRoot = filepath.Join(modulesDir, t.moduleName) | ||
t.modulePath = t.moduleRoot | ||
case "kotlin": | ||
t.moduleRoot = filepath.Join(modulesDir, fmt.Sprintf("ftl-module-%s", t.moduleName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated but I think we should get rid of ftl-module-<name>
and just have <name>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed!
import ( | ||
"context" | ||
|
||
ftl "github.com/TBD54566975/ftl/go-runtime/sdk" // Import the FTL SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also unrelated but I think we should change this package from sdk
to ftl
9217ae1
to
a34169c
Compare
refactors integration tests to execute identically across runtimes with this change, we can also specify tests to run with the integration-test script (e.g. `integration-tests TestLifecycle` — all tests are fully encapsulated and can execute alone). providing no option will run all tests. tests have been split into the following: - TestLifecycle (init, deploy, call) - TestHttpIngress (tests all http methods and tests aliased fields) - TestDatabase - TestExternalCalls (kotlin -> go call, kotlin -> kotlin call, etc. for all runtime permutations) a couple small changes captured by the integration tests are also included in this PR: - Database.kt converts module name and DB name to uppercase to align with the Go DB SDK - Kotlin schema extractor includes module names for all DataRef schema objects, even those declared in the referencing module (this fixes builtin.HttpRequest/Response types for HTTP ingress in Kotlin)
a34169c
to
4824784
Compare
Huge, Lizzy, nice work and thanks. |
refactors integration tests to execute identically across runtimes
with this change, we can also specify tests to run with the integration-test script (e.g.
integration-tests TestLifecycle
— all tests are fully encapsulated and can execute alone). providing no option will run all tests.tests have been split into the following:
a couple small changes captured by the integration tests are also included in this PR: