From 638424812372cc60fea7f548712bfb92ed0275e2 Mon Sep 17 00:00:00 2001 From: Andy Doan Date: Mon, 23 Feb 2026 09:05:31 -0600 Subject: [PATCH] fiotest: Update the way we set the test "target" When we run remote-actions we must set a "target" to use the fiotest backend APIs. However, by setting x-ats-target, the device gateway may update the device's actual target name while fiotest is running leading to confusion. The device gateway was changed to allow a target name to be set in the test body to work around this. Signed-off-by: Andy Doan --- fiotest/api.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fiotest/api.go b/fiotest/api.go index aa1ac16..2e904c7 100644 --- a/fiotest/api.go +++ b/fiotest/api.go @@ -25,16 +25,14 @@ func NewApi(client *http.Client, fiotestUrl string) *Api { } func (a Api) Create(name, testId string) (*Test, error) { - // Hard-coded to group all tests by the same Target in the backend - headers := map[string]string{"x-ats-target": "fiocofig-action"} - type testbody struct { Name string `json:"name"` + Target string `json:"target"` TestId string `json:"test-id"` } - body := testbody{Name: name, TestId: testId} + body := testbody{Name: name, Target: "fioconfig-action", TestId: testId} - res, err := transport.HttpDo(a.client, http.MethodPost, a.baseUrl, headers, body) + res, err := transport.HttpDo(a.client, http.MethodPost, a.baseUrl, nil, body) if err != nil { return nil, err } else if res.StatusCode != 201 {