File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -153,11 +153,6 @@ func createTestServer(t *testing.T) *Server {
153153
154154// TestServer_envoyAuthHandler tests the Envoy auth handler
155155func TestServer_envoyAuthHandler (t * testing.T ) {
156- const (
157- testDeviceID = "test-device"
158- testAllowPath = "/v1/data/keep/allow"
159- testClientRemoteIP = "100.65.1.1:12345"
160- )
161156 // Create mock OPA server
162157 mockOPA := httptest .NewServer (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
163158 if r .URL .Path == testAllowPath && r .Method == http .MethodPost {
@@ -437,7 +432,7 @@ func TestServer_lookupDevice(t *testing.T) {
437432 result := server .lookupDevice (context .Background (), testDeviceID )
438433
439434 expected := map [string ]any {
440- "id" : "test-device" ,
435+ "id" : testDeviceID ,
441436 "posture" : "unknown" ,
442437 }
443438
@@ -511,7 +506,7 @@ func TestServer_lookupDevice(t *testing.T) {
511506
512507 server := createTestServerWithMocks (t , "" , mockInventory .URL )
513508
514- result := server .lookupDevice (ctx , "test-device" )
509+ result := server .lookupDevice (ctx , testDeviceID )
515510
516511 if result ["posture" ] != "unknown" {
517512 t .Errorf ("Expected posture 'unknown' for service error, got %v" , result ["posture" ])
You can’t perform that action at this time.
0 commit comments