Minor changes to fix lint errors

This commit is contained in:
David Allen 2024-08-13 10:41:06 -06:00
parent 128f9ad42d
commit 81ec43a923
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
11 changed files with 90 additions and 78 deletions

View file

@ -15,6 +15,7 @@ import (
"github.com/OpenCHAMI/magellan/pkg/client"
"github.com/OpenCHAMI/magellan/pkg/crawler"
"github.com/rs/zerolog/log"
)
var (
@ -26,7 +27,7 @@ var (
// Simple test to fetch the base Redfish URL and assert a 200 OK response.
func TestRedfishV1Availability(t *testing.T) {
var (
url = fmt.Sprintf("%s/redfish/v1", host)
url = fmt.Sprintf("%s/redfish/v1", *host)
body = []byte{}
headers = map[string]string{}
)
@ -55,12 +56,16 @@ func TestRedfishV1Availability(t *testing.T) {
// Simple test to ensure an expected Redfish version minimum requirement.
func TestRedfishVersion(t *testing.T) {
var (
url = fmt.Sprintf("%s/redfish/v1", host)
body = []byte{}
headers = map[string]string{}
url string = fmt.Sprintf("%s/redfish/v1", *host)
body client.HTTPBody = []byte{}
headers client.HTTPHeader = map[string]string{}
err error
)
client.MakeRequest(nil, url, http.MethodGet, body, headers)
_, _, err = client.MakeRequest(nil, url, http.MethodGet, body, headers)
if err != nil {
log.Error().Err(err).Msg("failed to make request")
}
}
// Crawls a BMC node and checks that we're able to query certain properties