Skip to content

Commit

Permalink
Fix function parameter and update GoRouterProxy command arguments
Browse files Browse the repository at this point in the history
 - Correct the missing type for the `portToForward` parameter in `GoRouterProxy` function.
 - Update command arguments to include `--port` and `--forwardTo` flags in `GoRouterProxy`.
 - Add `GoRouterProxy` port to the `PreparePorts` function.
 - Prefix a test with `FWhen` to focus on a specific scheduler test.
  • Loading branch information
bonzofenix committed Jan 23, 2025
1 parent 559fb4b commit a6dd0c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/autoscaler/integration/components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type ServiceBrokerClient struct {
TLS models.TLSCerts `json:"tls"`
}

func (components *Components) GoRouterProxy(portToForward) *ginkgomon_v2.Runner {
func (components *Components) GoRouterProxy(portToForward int) *ginkgomon_v2.Runner {
return ginkgomon_v2.New(ginkgomon_v2.Config{
Name: GoRouterProxy,
AnsiColorCode: "32m",
Expand All @@ -95,8 +95,9 @@ func (components *Components) GoRouterProxy(portToForward) *ginkgomon_v2.Runner
Command: exec.Command(
components.Executables[GoRouterProxy],
append([]string{
"-p", portToForward,
}, argv...)...,
"--port", fmt.Sprint(components.Ports[GoRouterProxy]),
"--forwardTo", fmt.Sprint(portToForward),
})...,
),
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,8 @@ var _ = Describe("Integration_GolangApi_Scheduler", func() {
})
})

When("scheduler responding on cf server via http", func() {
FWhen("scheduler responding on cf server via http", func() {
BeforeEach(func() {

golangApiServerConfPath := components.PrepareGolangApiServerConfig(
dbUrl,
components.Ports[GolangAPIServer],
Expand Down
1 change: 1 addition & 0 deletions src/autoscaler/integration/integration_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func PreparePorts() Ports {
EventGenerator: 17000 + GinkgoParallelProcess(),
CfEventGenerator: 17500 + GinkgoParallelProcess(),
ScalingEngine: 18000 + GinkgoParallelProcess(),
GoRouterProxy: 19000 + GinkgoParallelProcess(),
}
}

Expand Down

0 comments on commit a6dd0c6

Please sign in to comment.