From 8747dd0c7571a5b1317fc05ef6dfb8b51b37aa47 Mon Sep 17 00:00:00 2001 From: James Pickett Date: Thu, 26 Sep 2024 11:42:11 -0700 Subject: [PATCH] skip presence test on non darwin --- ee/localserver/presence-detection-middleware_test.go | 5 +++++ ee/localserver/server.go | 1 + 2 files changed, 6 insertions(+) diff --git a/ee/localserver/presence-detection-middleware_test.go b/ee/localserver/presence-detection-middleware_test.go index d00e8d3f6..2ff95031c 100644 --- a/ee/localserver/presence-detection-middleware_test.go +++ b/ee/localserver/presence-detection-middleware_test.go @@ -3,6 +3,7 @@ package localserver import ( "net/http" "net/http/httptest" + "runtime" "testing" "time" @@ -17,6 +18,10 @@ import ( func TestPresenceDetectionHandler(t *testing.T) { t.Parallel() + if runtime.GOOS != "darwin" { + t.Skip("test only runs on darwin until implemented for other OSes") + } + tests := []struct { name string expectDetectPresenceCall bool diff --git a/ee/localserver/server.go b/ee/localserver/server.go index 5631ecaba..e2a9620dc 100644 --- a/ee/localserver/server.go +++ b/ee/localserver/server.go @@ -413,6 +413,7 @@ func (ls *localServer) rateLimitHandler(next http.Handler) http.Handler { func (ls *localServer) presenceDetectionHandler(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // presence detection is only supported on macos currently if runtime.GOOS != "darwin" { next.ServeHTTP(w, r) return