feat: harden runtime import and frontend verification workflows
This commit is contained in:
@@ -28,7 +28,7 @@ func (c *Client) ProbeCapabilities(ctx context.Context) (HostCapabilities, error
|
||||
return HostCapabilities{}, err
|
||||
}
|
||||
|
||||
accountTest, err := c.probeEndpoint(ctx, http.MethodGet, "/api/v1/admin/accounts/__probe__/test", nil)
|
||||
accountTest, err := c.probeEndpoint(ctx, http.MethodPost, "/api/v1/admin/accounts/__probe__/test", map[string]any{})
|
||||
if err != nil {
|
||||
return HostCapabilities{}, err
|
||||
}
|
||||
|
||||
@@ -1103,6 +1103,9 @@ func TestProbeCapabilitiesWithMock(t *testing.T) {
|
||||
callCount := 0
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
callCount++
|
||||
if r.URL.Path == "/api/v1/admin/accounts/__probe__/test" && r.Method != http.MethodPost {
|
||||
t.Fatalf("account test probe method = %s, want POST", r.Method)
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
_, _ = w.Write([]byte(`{"data":[]}`))
|
||||
|
||||
Reference in New Issue
Block a user