Skip to content

Commit

Permalink
remove debugging stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett committed Dec 17, 2024
1 parent a43d66b commit bded495
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ee/localserver/request-id.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (ls *localServer) requestIdHandlerFunc(w http.ResponseWriter, r *http.Reque
Origin: r.Header.Get("Origin"),
Status: status{
EnrollmentStatus: string(enrollmentStatus),
// InstanceStatuses: ls.knapsack.InstanceStatuses(),
InstanceStatuses: ls.knapsack.InstanceStatuses(),
},
}
response.identifiers = ls.identifiers
Expand Down
4 changes: 1 addition & 3 deletions ee/localserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ func New(ctx context.Context, k types.Knapsack, presenceDetector presenceDetecto
// curl localhost:40978/acceleratecontrol --data '{"interval":"250ms", "duration":"1s"}'
// mux.Handle("/acceleratecontrol", ls.requestAccelerateControlHandler())
// curl localhost:40978/id
mux.Handle("/id", ls.presenceDetectionHandler(ls.requestIdHandler()))

mux.Handle("/id2", ls.requestIdHandler())
// mux.Handle("/id", ls.presenceDetectionHandler(ls.requestIdHandler()))

srv := &http.Server{
Handler: otelhttp.NewHandler(
Expand Down
12 changes: 0 additions & 12 deletions ee/presencedetection/presencedetection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,6 @@ func TestPresenceDetector_DetectPresence(t *testing.T) {
initialLastDetectionUTC: time.Now().UTC(),
expectError: true,
},
{
// this should never happen, but it is here for completeness
name: "subsequent detection inside min detection attempt interval",
interval: 0,
detector: func(t *testing.T) detectorIface {
d := mocks.NewDetectorIface(t)
d.On("Detect", mock.AnythingOfType("string")).Return(false, nil).Once()
return d
},
initialLastDetectionUTC: time.Now().UTC(),
expectError: true,
},
}

for _, tt := range tests {
Expand Down

0 comments on commit bded495

Please sign in to comment.