Skip to content

Commit

Permalink
skip presence test on non darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett committed Sep 26, 2024
1 parent aa824b1 commit 8747dd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ee/localserver/presence-detection-middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package localserver
import (
"net/http"
"net/http/httptest"
"runtime"
"testing"
"time"

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions ee/localserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8747dd0

Please sign in to comment.