Skip to content

Commit

Permalink
Simplify devLoopEvent message text (#4684)
Browse files Browse the repository at this point in the history
  • Loading branch information
briandealwis authored Aug 18, 2020
1 parent 3b0dd74 commit 27100ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/skaffold/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,11 @@ func (ev *eventHandler) handleExec(f firedEvent) {
de := e.DevLoopEvent
switch de.Status {
case InProgress:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d in progress", de.Iteration)
logEntry.Entry = "Update initiated due to file change"
case Succeeded:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d successful", de.Iteration)
logEntry.Entry = "Update successful"
case Failed:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d failed with error code %v", de.Iteration, de.Err.ErrCode)
logEntry.Entry = fmt.Sprintf("Update failed with error code %v", de.Err.ErrCode)
}
default:
return
Expand Down
6 changes: 3 additions & 3 deletions pkg/skaffold/event/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_BUILD_PUSH_ACCESS_DENIED)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_BUILD_PUSH_ACCESS_DENIED)
},
},
{
Expand All @@ -489,7 +489,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_DEPLOY_UNKNOWN)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_DEPLOY_UNKNOWN)
},
},
{
Expand All @@ -504,7 +504,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_STATUSCHECK_UNHEALTHY)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_STATUSCHECK_UNHEALTHY)
},
},
}
Expand Down

0 comments on commit 27100ad

Please sign in to comment.