Skip to content

Commit

Permalink
Fix Write call
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Sep 28, 2024
1 parent f5c5bdb commit d9c9415
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ai/inference/compute_environment_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package inference_test

import (
"encoding/json"
"io"
"net/http"
"testing"

Expand Down Expand Up @@ -35,7 +34,7 @@ func TestComputeEnvironmentCRD(t *testing.T) {
w.WriteHeader(http.StatusInternalServerError)
return
}
_, _ = io.WriteString(w, string(resp))
_, _ = w.Write(resp)
case http.MethodDelete:
w.WriteHeader(http.StatusOK)
default:
Expand All @@ -61,7 +60,7 @@ func TestComputeEnvironmentCRD(t *testing.T) {
return
}
w.WriteHeader(http.StatusCreated)
_, _ = io.WriteString(w, string(resp))
_, _ = w.Write(resp)
default:
w.WriteHeader(http.StatusNotImplemented)
}
Expand Down
2 changes: 1 addition & 1 deletion ai/inference/compute_target_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestComputeTargetCRD(t *testing.T) {
w.WriteHeader(http.StatusInternalServerError)
return
}
_, _ = io.WriteString(w, string(resp))
_, _ = w.Write(resp)
case http.MethodDelete:
w.WriteHeader(http.StatusOK)
default:
Expand Down

0 comments on commit d9c9415

Please sign in to comment.