From cd906584f623ccc82a8a25c7b86e2132db882776 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Thu, 14 Sep 2023 10:19:53 +0200 Subject: [PATCH] providers/redfish/firmware: don't use constants --- providers/redfish/firmware.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/providers/redfish/firmware.go b/providers/redfish/firmware.go index e5970a8a..258c2289 100644 --- a/providers/redfish/firmware.go +++ b/providers/redfish/firmware.go @@ -189,7 +189,6 @@ func (c *Conn) multipartHTTPUpload(ctx context.Context, url, applyAt string, upd } func (c *Conn) unstructuredHttpUpload(ctx context.Context, url, applyAt string, update io.Reader) (*http.Response, error) { - if url == "" { return nil, fmt.Errorf("unable to execute request, no target provided") } @@ -397,9 +396,9 @@ func (c *Conn) FirmwareInstallStatus(ctx context.Context, installVersion, compon return state, errors.Wrap(err, "unable to determine device vendor, model attributes") } - // component is not used, we hack it for tests + // component is not used, we hack it for tests, easier than mocking if component == "testOpenbmc" { - vendor = constants.Packet + vendor = "defaultVendor" } var task *gofishrf.Task