Skip to content

Commit

Permalink
providers/redfish/firmware: don't use constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Sep 14, 2023
1 parent 2d74d03 commit cd90658
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions providers/redfish/firmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Check warning on line 193 in providers/redfish/firmware.go

View check run for this annotation

Codecov / codecov/patch

providers/redfish/firmware.go#L191-L193

Added lines #L191 - L193 were not covered by tests
}
Expand Down Expand Up @@ -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")

Check warning on line 396 in providers/redfish/firmware.go

View check run for this annotation

Codecov / codecov/patch

providers/redfish/firmware.go#L396

Added line #L396 was not covered by tests
}

// 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
Expand Down

0 comments on commit cd90658

Please sign in to comment.