Skip to content

Envtest Fails to Stop Control Plane on Windows #3518

@gologames

Description

@gologames

envtest.Environment.Stop() fails on Windows after starting the local control plane.

The tests can pass, but teardown fails when stopping kube-apiserver and etcd:

unable to signal for process ... kube-apiserver to stop: not supported by windows
unable to signal for process ... etcd to stop: not supported by windows

The failure seems to come from pkg/internal/testing/process/signal_other.go, which calls os.Process.Signal(sig). On Windows, signaling SIGTERM / SIGKILL is not supported.

Expected behavior: envtest.Environment.Stop() should stop the local control plane successfully on Windows.

I tested a small patch that adds a Windows-specific signalProcess implementation using process.Kill(), and it fixes teardown for an envtest admission webhook suite on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions