Remove distinct steps test until all of JSON output has been implemented

pull/8663/head
Priya Wadhwa 2020-07-08 09:16:55 -04:00
parent 776e6c4ab3
commit 6f5fc02b8c
1 changed files with 0 additions and 26 deletions

View File

@ -49,7 +49,6 @@ func TestJSONOutput(t *testing.T) {
validator validateJSONOutputFunc
}{
{"CloudEvents", validateCloudEvents},
{"CurrentSteps", validateCurrentSteps},
}
for _, stc := range serialTests {
t.Run(stc.name, func(t *testing.T) {
@ -73,28 +72,3 @@ func validateCloudEvents(ctx context.Context, t *testing.T, rr *RunResult) {
}
}
}
// make sure each step in a successful `minikube start` has a distict step number
func validateCurrentSteps(ctx context.Context, t *testing.T, rr *RunResult) {
stdout := strings.Split(rr.Stdout.String(), "\n")
data := map[string]string{}
currentSteps := map[string]struct{}{}
for _, s := range stdout {
if s == "" {
continue
}
event := cloudevents.NewEvent()
if err := json.Unmarshal([]byte(s), &event); err != nil {
t.Fatalf("unable to unmarshal output: %v\n%s", err, s)
}
if err := json.Unmarshal(event.Data(), &data); err != nil {
t.Fatalf("unable to unmarshal output: %v\n%s", err, s)
}
cs := data["currentstep"]
if _, ok := currentSteps[cs]; ok {
t.Fatalf("The log \"%s\" has already been logged, please create a new log for this step: %v", data["name"], data["message"])
} else {
currentSteps[cs] = struct{}{}
}
}
}