generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: integration test option to use
ftl-provisioner
(#2892)
runs deployments through the provisioner if requested This also adds a hidden CLI flags `--use-provisioner` to deploy using the provisioner service instead of controller `--provisioner-endpoint` to set the provisioner endpoint Next, I will look how to integrate `ftl-provisioner` better with `ftl serve`
- Loading branch information
Showing
12 changed files
with
113 additions
and
23 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,21 @@ | ||
//go:build integration | ||
|
||
package provisioner_test | ||
|
||
import ( | ||
"testing" | ||
|
||
in "github.com/TBD54566975/ftl/internal/integration" | ||
"github.com/alecthomas/assert/v2" | ||
) | ||
|
||
func TestDeploymentThroughProvisioner(t *testing.T) { | ||
in.Run(t, | ||
in.WithProvisioner(), | ||
in.CopyModule("echo"), | ||
in.Deploy("echo"), | ||
in.Call("echo", "echo", "Bob", func(t testing.TB, response string) { | ||
assert.Equal(t, "Hello, Bob!!!", response) | ||
}), | ||
) | ||
} |
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
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,14 @@ | ||
// This is the echo module. | ||
package echo | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
) | ||
|
||
// Echo returns a greeting with the current time. | ||
// | ||
//ftl:verb export | ||
func Echo(ctx context.Context, req string) (string, error) { | ||
return fmt.Sprintf("Hello, %s!!!", req), nil | ||
} |
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,2 @@ | ||
module = "echo" | ||
language = "go" |
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,5 @@ | ||
module ftl/echo | ||
|
||
go 1.23.0 | ||
|
||
replace github.com/TBD54566975/ftl => ./../../../../../.. |
Empty file.
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
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
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
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
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
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