Skip to content
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

feat: run tests on different port #2578

Closed
wants to merge 1 commit into from
Closed

Conversation

stuartwdouglas
Copy link
Collaborator

This should stop tests from interferring with ftl dev

fixes #2577

@stuartwdouglas stuartwdouglas added the run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue label Sep 2, 2024
This was referenced Sep 2, 2024
@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/2577 branch 5 times, most recently from 8143b1e to 78d2844 Compare September 5, 2024 01:52
@stuartwdouglas stuartwdouglas marked this pull request as ready for review September 5, 2024 01:52
@stuartwdouglas stuartwdouglas requested review from a team and jonathanj-square and removed request for a team September 5, 2024 01:52
@@ -170,7 +172,7 @@ func Exec(cmd string, args ...string) Action {
func ExecWithExpectedOutput(want string, cmd string, args ...string) Action {
return func(t testing.TB, ic TestContext) {
Infof("Executing: %s %s", cmd, shellquote.Join(args...))
output, err := ftlexec.Capture(ic, ic.workDir, cmd, args...)
output, err := ftlexec.CaptureWithEnv(ic, ic.workDir, cmd, []string{"FTL_ENDPOINT=http://127.0.0.1:" + TestPort}, args...)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having to do this, let's just set FTL_ENDPOINT in Run() with t.Setenv() then it's just set everywhere by default.

@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/2577 branch 2 times, most recently from afd8805 to 844229f Compare September 5, 2024 03:44
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this to work it will also need the ability to use a database other than "ftl" :\

This should stop tests from interferring with ftl dev

fixes #2577
@stuartwdouglas
Copy link
Collaborator Author

closing for now, as it is not a priority and turned out to require more time than I expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run tests on a non-default port
2 participants