Skip to content

Commit

Permalink
fix weird rebase issue
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Oct 4, 2024
1 parent e577e8d commit c901c8d
Showing 1 changed file with 129 additions and 134 deletions.
263 changes: 129 additions & 134 deletions internal/watch/discover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,166 +14,161 @@ func TestDiscoverModules(t *testing.T) {
ctx := log.ContextWithNewDefaultLogger(context.Background())
modules, err := DiscoverModules(ctx, []string{"testdata"})
assert.NoError(t, err)
expected := []Module{
expected := []moduleconfig.ModuleConfig{
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/alpha",
Language: "go",
Realm: "home",
Module: "alpha",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum", "../../../../go-runtime/ftl/**/*.go"},
Dir: "testdata/alpha",
Language: "go",
Realm: "home",
Module: "alpha",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"../../../../go-runtime/ftl/**/*.go",
"go.mod",
"go.sum",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/another",
Language: "go",
Realm: "home",
Module: "another",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum", "../../../../go-runtime/ftl/**/*.go"},
Dir: "testdata/another",
Language: "go",
Realm: "home",
Module: "another",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"../../../../go-runtime/ftl/**/*.go",
"../../../../go-runtime/schema/testdata/**/*.go",
"go.mod",
"go.sum",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/depcycle1",
Language: "go",
Realm: "home",
Module: "depcycle1",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum"},
Dir: "testdata/depcycle1",
Language: "go",
Realm: "home",
Module: "depcycle1",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"go.mod",
"go.sum",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/depcycle2",
Language: "go",
Realm: "home",
Module: "depcycle2",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum"},
Dir: "testdata/depcycle2",
Language: "go",
Realm: "home",
Module: "depcycle2",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"go.mod",
"go.sum",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/echokotlin",
Language: "kotlin",
Realm: "home",
Module: "echo",
Build: "mvn -B package",
Deploy: []string{
"main",
"quarkus-app",
},
DeployDir: "target",
GeneratedSchemaDir: "src/main/ftl-module-schema",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{
"pom.xml",
"src/**",
"target/generated-sources",
},
Java: moduleconfig.ModuleJavaConfig{
BuildTool: "maven",
},

Dir: "testdata/echokotlin",
Language: "kotlin",
Realm: "home",
Module: "echo",
Build: "mvn -B package",
Deploy: []string{
"launch",
"quarkus-app",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/external",
Language: "go",
Realm: "home",
Module: "external",
Build: "",
Deploy: []string{
"main",
},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"go.mod",
"go.sum",
},
DeployDir: "target",
GeneratedSchemaDir: "src/main/ftl-module-schema",
Errors: "errors.pb",
Watch: []string{
"pom.xml",
"src/**",
"target/generated-sources",
},
Java: moduleconfig.ModuleJavaConfig{
BuildTool: "maven",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/externalkotlin",
Language: "kotlin",
Realm: "home",
Module: "externalkotlin",
Build: "mvn -B package",
Deploy: []string{
"main",
"quarkus-app",
},
DeployDir: "target",
GeneratedSchemaDir: "src/main/ftl-module-schema",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{
"pom.xml",
"src/**",
"target/generated-sources",
},
Java: moduleconfig.ModuleJavaConfig{
BuildTool: "maven",
},

Dir: "testdata/external",
Language: "go",
Realm: "home",
Module: "external",
Build: "",
Deploy: []string{
"launch",
"main",
},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"go.mod",
"go.sum",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/highgoversion",
Language: "go",
Realm: "home",
Module: "highgoversion",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum", "../../../../go-runtime/ftl/**/*.go"},

Dir: "testdata/externalkotlin",
Language: "kotlin",
Realm: "home",
Module: "externalkotlin",
Build: "mvn -B package",
Deploy: []string{
"launch",
"quarkus-app",
},
DeployDir: "target",
GeneratedSchemaDir: "src/main/ftl-module-schema",
Errors: "errors.pb",
Watch: []string{
"pom.xml",
"src/**",
"target/generated-sources",
},
Java: moduleconfig.ModuleJavaConfig{
BuildTool: "maven",
},
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/integer",
Language: "go",
Realm: "home",
Module: "integer",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum"},

Dir: "testdata/integer",
Language: "go",
Realm: "home",
Module: "integer",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Watch: []string{
"**/*.go",
"go.mod",
"go.sum",
},
Errors: "errors.pb",
},
{
Config: moduleconfig.ModuleConfig{
Dir: "testdata/other",
Language: "go",
Realm: "home",
Module: "other",
Deploy: []string{"main"},
DeployDir: ".ftl",
Schema: "schema.pb",
Errors: "errors.pb",
Watch: []string{"**/*.go", "go.mod", "go.sum", "../../../../go-runtime/ftl/**/*.go"},

Dir: "testdata/other",
Language: "go",
Realm: "home",
Module: "other",
Deploy: []string{"launch", "main"},
DeployDir: ".ftl",
Errors: "errors.pb",
Watch: []string{
"**/*.go",
"../../../../go-runtime/ftl/**/*.go",
"../../../../go-runtime/schema/testdata/**/*.go",
"go.mod",
"go.sum",
},
},
}
Expand Down

0 comments on commit c901c8d

Please sign in to comment.