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.
fix: module tests can have
_test
package suffix (#2149)
fixes #2141 Also added a test for a subpackage within a module to confirm that the correct module name is derived
- Loading branch information
Showing
10 changed files
with
175 additions
and
3 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
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 = "outer" | ||
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,24 @@ | ||
module ftl/outer | ||
|
||
go 1.22.2 | ||
|
||
toolchain go1.22.3 | ||
|
||
replace github.com/TBD54566975/ftl => ./../../../../../.. | ||
|
||
require ( | ||
github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000 | ||
github.com/alecthomas/assert/v2 v2.10.0 | ||
) | ||
|
||
require ( | ||
github.com/alecthomas/participle/v2 v2.1.1 // indirect | ||
github.com/alecthomas/repr v0.4.0 // indirect | ||
github.com/alecthomas/types v0.16.0 // indirect | ||
github.com/hexops/gotextdiff v1.0.3 // indirect | ||
github.com/stretchr/testify v1.9.0 // indirect | ||
github.com/swaggest/jsonschema-go v0.3.72 // indirect | ||
github.com/swaggest/refl v1.3.0 // indirect | ||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect | ||
google.golang.org/protobuf v1.34.2 // indirect | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
package inner |
13 changes: 13 additions & 0 deletions
13
go-runtime/ftl/ftltest/testdata/go/outer/inner/inner_test.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,13 @@ | ||
package inner_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/TBD54566975/ftl/go-runtime/ftl/reflection" | ||
"github.com/alecthomas/assert/v2" | ||
) | ||
|
||
func TestInner(t *testing.T) { | ||
// make sure that packages within a module are correctly identified as being part of the correct module | ||
assert.Equal(t, "outer", reflection.Module()) | ||
} |
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 @@ | ||
package outer |
2 changes: 1 addition & 1 deletion
2
go-runtime/ftl/ftltest/testdata/go/subscriber/subscriber_test.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package subscriber | ||
package subscriber_test | ||
|
||
import ( | ||
"ftl/pubsub" | ||
|
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