Skip to content

Commit

Permalink
dash: make sure failure is *string (#172)
Browse files Browse the repository at this point in the history
Closes #146
  • Loading branch information
bassosimone committed Dec 15, 2019
1 parent b085006 commit dfc06c4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions experiment/dash/dash_otherwise.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Simple struct {
// TestKeys contains the test keys
type TestKeys struct {
Simple Simple `json:"simple"`
Failure string `json:"failure"`
Failure *string `json:"failure"`
ReceiverData []neubotModel.ClientResults `json:"receiver_data"`
}

Expand Down Expand Up @@ -161,12 +161,14 @@ func (tk *TestKeys) printSummary(logger log.Logger) {
func (r *runner) do(ctx context.Context) error {
err := r.loop(ctx)
if err != nil {
r.tk.Failure = err.Error()
s := err.Error()
r.tk.Failure = &s
return err
}
err = r.tk.analyze()
if err != nil {
r.tk.Failure = err.Error()
s := err.Error()
r.tk.Failure = &s
return err
}
r.callbacks.OnProgress(1, "done")
Expand Down

0 comments on commit dfc06c4

Please sign in to comment.