From c88619f16fc998300a16dfb06ac9d86395d8a7b3 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Fri, 21 Aug 2020 09:53:13 -0400 Subject: [PATCH] Remove debugging --- cmd/minikube/cmd/status.go | 13 ++----------- test/integration/status_test.go | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index fc931be6df85..228dbdb0e074 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -429,9 +429,7 @@ func readEventLog(name string) ([]cloudevents.Event, time.Time, error) { scanner := bufio.NewScanner(f) for scanner.Scan() { ev := cloudevents.NewEvent() - b := scanner.Bytes() - if err = json.Unmarshal(b, &ev); err != nil { - glog.Infof("error unmarshalling data: %v\n%v", err, string(b)) + if err = json.Unmarshal(scanner.Bytes(), &ev); err != nil { return events, st.ModTime(), err } events = append(events, ev) @@ -443,7 +441,6 @@ func readEventLog(name string) ([]cloudevents.Event, time.Time, error) { // clusterState converts Status structs into a ClusterState struct func clusterState(sts []*Status) ClusterState { sc := statusCode(sts[0].Host) - glog.Infof("Initial status code is %v", sc) cs := ClusterState{ BinaryVersion: version.GetVersion(), @@ -489,8 +486,6 @@ func clusterState(sts []*Status) ClusterState { glog.Errorf("unable to read event log: %v", err) return cs } - glog.Infof("Found %v events in event log", len(evs)) - glog.Infof("%v", evs) transientCode := 0 var finalStep map[string]string @@ -504,7 +499,6 @@ func clusterState(sts []*Status) ClusterState { glog.Errorf("unable to parse data: %v\nraw data: %s", err, ev.Data()) continue } - glog.Infof("looking at step %v", data["name"]) switch data["name"] { case string(register.InitialSetup): @@ -532,11 +526,9 @@ func clusterState(sts []*Status) ClusterState { glog.Errorf("unable to parse data: %v\nraw data: %s", err, ev.Data()) continue } - glog.Infof("exit code is %v", data["exitcode"]) - exitCode, err := strconv.Atoi(strings.Trim(data["exitcode"], "\n")) + exitCode, err := strconv.Atoi(data["exitcode"]) if err != nil { glog.Errorf("unable to convert exit code to int: %v", err) - glog.Error("(event) ", data) continue } transientCode = exitCode @@ -556,7 +548,6 @@ func clusterState(sts []*Status) ClusterState { cs.Step = strings.TrimSpace(finalStep["name"]) cs.StepDetail = strings.TrimSpace(finalStep["message"]) if transientCode != 0 { - glog.Infof("resetting status code to transient code %v", transientCode) cs.StatusCode = transientCode } } diff --git a/test/integration/status_test.go b/test/integration/status_test.go index c89ed58762fa..72ba6d5059be 100644 --- a/test/integration/status_test.go +++ b/test/integration/status_test.go @@ -67,7 +67,7 @@ func TestInsufficientStorage(t *testing.T) { // runStatusCmd runs the status command and returns stdout func runStatusCmd(ctx context.Context, t *testing.T, profile string) []byte { // make sure minikube status shows insufficient storage - c := exec.CommandContext(ctx, Target(), "status", "-p", profile, "--output=json", "--layout=cluster", "--alsologtostderr") + c := exec.CommandContext(ctx, Target(), "status", "-p", profile, "--output=json", "--layout=cluster") // artificially set /var to 100% capacity c.Env = append(os.Environ(), fmt.Sprintf("%s=100", constants.TestStorageCapacityEnv)) rr, err := Run(t, c)