Skip to content

Commit 118a19d

Browse files
test
1 parent 41c3616 commit 118a19d

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

hack/prow/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ echo $PATH
176176
gotestsum --jsonfile "${JSON_OUT}" --junitfile="${JUNIT_OUT}" -f standard-verbose --raw-command -- \
177177
go tool test2json -t \
178178
${E2E_BIN} \
179+
-test.run TestScheduledStopUnix \
179180
-minikube-start-args="--driver=${DRIVER} ${EXTRA_START_ARGS}" \
180181
-test.timeout=${TIMEOUT} -test.v \
181182
${EXTRA_TEST_ARGS} \

out.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
go build -tags "libvirt_dlopen" -ldflags="-X k8s.io/minikube/pkg/version.version=v1.37.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.37.0-1762018871-21834 -X k8s.io/minikube/pkg/version.gitCommitID="8f3cadfdfdc7d39f951f3d645b177c153316cc08-dirty" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v5" -o out/minikube k8s.io/minikube/cmd/minikube

pkg/minikube/schedule/daemonize_unix.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ import (
3838
func KillExisting(profiles []string, options *run.CommandOptions) {
3939
for _, profile := range profiles {
4040
if err := killPIDForProfile(profile); err != nil {
41+
fmt.Printf("error killing PID for profile %s: %v\n", profile, err)
4142
klog.Warningf("error killng PID for profile %s: %v", profile, err)
4243
}
4344
_, cc := mustload.Partial(profile, options)
4445
cc.ScheduledStop = nil
4546
if err := config.SaveProfile(profile, cc); err != nil {
47+
fmt.Printf("error saving profile for profile %s: %v\n", profile, err)
4648
klog.Errorf("error saving profile for profile %s: %v", profile, err)
4749
}
4850
}
@@ -71,6 +73,7 @@ func killPIDForProfile(profile string) error {
7173
return errors.Wrap(err, "finding process")
7274
}
7375
klog.Infof("killing process %v as it is an old scheduled stop", pid)
76+
7477
if err := p.Kill(); err != nil {
7578
return errors.Wrapf(err, "killing %v", pid)
7679
}

test/integration/scheduled_stop_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func TestScheduledStopUnix(t *testing.T) {
9393
}
9494

9595
// schedule a second stop which should cancel the first scheduled stop
96-
stopMinikube(ctx, t, profile, []string{"--schedule", "15s"})
96+
stopMinikube(ctx, t, profile, []string{"--schedule", "15s","-v=5","--alsologtostderr"})
9797
if processRunning(t, pid) {
9898
t.Fatalf("process %v running but should have been killed on reschedule of stop", pid)
9999
}
@@ -138,6 +138,9 @@ func stopMinikube(ctx context.Context, t *testing.T, profile string, additionalA
138138
if err != nil {
139139
t.Fatalf("stopping minikube: %v\n%s", err, rr.Output())
140140
}
141+
fmt.Println("minikube stop output:")
142+
fmt.Println(rr.Output())
143+
141144
}
142145

143146
func checkPID(t *testing.T, profile string) string {

0 commit comments

Comments
 (0)