//go:build !cgo package backend import ( "testing" ) // TestControlHost_StubReturnsError verifies that in the non-CGO build the // ControlHost function is present, accepts the expected parameters, and // returns a non-nil error (the errNoCGO sentinel). func TestControlHost_StubReturnsError(t *testing.T) { err := ControlHost("node01", 1) if err == nil { t.Fatal("expected non-nil error from ControlHost stub") } } // TestControlHost_SignatureCompiles is a compile-time check that the function // signature matches: func ControlHost(hostname string, action int) error. // If the signature changes this test will not compile. func TestControlHost_SignatureCompiles(t *testing.T) { var _ func(string, int) error = ControlHost }