mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 08:10:26 +00:00
ca3e4b5709
Move the ICMP, TCP, HTTP and UDP probe core from the monitoring availability poller into internal/availabilityprobe so the host agent can execute the same checks without importing the monitoring package. Monitoring keeps type aliases and thin wrappers, so callers and the canonical guardrail contracts are unchanged. Pure refactor for the upcoming external probe feature. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
16 lines
601 B
Go
16 lines
601 B
Go
package availabilityprobe
|
|
|
|
import "testing"
|
|
|
|
// Moved verbatim from internal/monitoring/availability_poller_test.go when the
|
|
// probe execution core was extracted into this package.
|
|
func TestAvailabilityHTTPOutboundOptionsUsesSharedPeerCertificateCapture(t *testing.T) {
|
|
tlsConfig := httpOutboundOptions().TLSConfig
|
|
if tlsConfig == nil || !tlsConfig.InsecureSkipVerify {
|
|
t.Fatal("availability TLS config must enter explicit peer-certificate capture mode")
|
|
}
|
|
if tlsConfig.VerifyPeerCertificate == nil {
|
|
t.Fatal("availability TLS config must reject missing or malformed peer certificates")
|
|
}
|
|
}
|