Skip to content

Commit

Permalink
feat: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao committed Oct 19, 2023
1 parent 7ccbfe7 commit 5a2c694
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/utils/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var (
// DBCliApp the name of mock database app.
DBCliApp MockAppName = "db_cli-test"

// CoordinatorApp the name of mock coordinator app.
CoordinatorApp MockAppName = "coordinator-test"
// CoordinatorApiApp the name of mock coordinator app.
CoordinatorApiApp MockAppName = "coordinator-api-test"
// CoordinatorCronApp the name of mock coordinator cron app.
CoordinatorCronApp MockAppName = "coordinator-cron-test"

Expand Down
2 changes: 1 addition & 1 deletion coordinator/cmd/api/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func init() {
return utils.LogSetup(ctx)
}
// Register `coordinator-test` app for integration-test.
utils.RegisterSimulation(app, utils.CoordinatorApp)
utils.RegisterSimulation(app, utils.CoordinatorApiApp)
}

func action(ctx *cli.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion coordinator/cmd/api/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func TestRunCoordinator(t *testing.T) {
coordinator := cmd.NewCmd("coordinator-test", "--version")
coordinator := cmd.NewCmd("coordinator-api-test", "--version")
defer coordinator.WaitExit()

// wait result
Expand Down
2 changes: 1 addition & 1 deletion coordinator/cmd/api/app/mock_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewCoordinatorApp(base *docker.App, file string) *CoordinatorApp {

// RunApp run coordinator-test child process by multi parameters.
func (c *CoordinatorApp) RunApp(t *testing.T, args ...string) {
c.AppAPI = cmd.NewCmd(string(utils.CoordinatorApp), append(c.args, args...)...)
c.AppAPI = cmd.NewCmd(string(utils.CoordinatorApiApp), append(c.args, args...)...)
c.AppAPI.RunApp(func() bool { return c.AppAPI.WaitResult(t, time.Second*20, "Start coordinator successfully") })
}

Expand Down

0 comments on commit 5a2c694

Please sign in to comment.