Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
fix missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
dexhorthy committed Aug 14, 2018
1 parent 10e7813 commit f3b4802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
21 changes: 3 additions & 18 deletions pkg/lifecycle/daemon/routes_navcycle_completestep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ type completestepTestCase struct {
ExpectState *matchers.Is
OnExecute func(d *NavcycleRoutes, step api.Step) error
WaitForCleanup func() <-chan time.Time

// gonna move this to another test
//ExpectLifecycleCalls func(
// release *api.Release,
// m *lifecycle.MockMessenger,
// r *lifecycle.MockRenderer,
// d *daemon.MockDaemon, // this really only needs to be a StatusReceiver but I'm too lazy to mockgen one
// p *planner2.MockPlanner,
//)
//ExpectStepStatuses []struct {
// channel chan interface{}
// GET string
// progress interface{}
//}

}

func TestV2CompleteStep(t *testing.T) {
Expand Down Expand Up @@ -109,8 +94,8 @@ func TestV2CompleteStep(t *testing.T) {
"phase": "message",
"progress": map[string]interface{}{
"source": "v2router",
"type": "json",
"level": "info",
"type": "json",
"level": "info",
"detail": `{"status":"working"}`,
},
},
Expand Down Expand Up @@ -171,7 +156,7 @@ func TestV2CompleteStep(t *testing.T) {
POST: "/api/v1/navcycle/step/make-the-things",
// need to wait until the async task completes before we check all the expected mock calls,
// otherwise the state won't have been saved yet
WaitForCleanup: func() <-chan time.Time { return time.After(15 * time.Millisecond) },
WaitForCleanup: func() <-chan time.Time { return time.After(60 * time.Millisecond) },
OnExecute: func(d *NavcycleRoutes, step api.Step) error {
d.StepProgress.Store("make-the-things", daemontypes.StringProgress("unittest", "workin on it"))
time.Sleep(60 * time.Millisecond)
Expand Down
2 changes: 1 addition & 1 deletion pkg/lifecycle/daemon/routes_navcycle_getstep.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ func (d *NavcycleRoutes) getStep(c *gin.Context) {

if step.Render == nil {
d.hydrateAndSend(daemontypes.NewStep(step), c)
return
} else {
d.hackMaybeRunRenderOnGET(debug, c, step)
}
return
}
}

Expand Down

0 comments on commit f3b4802

Please sign in to comment.