mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Minor changes to fix lint errors
This commit is contained in:
parent
128f9ad42d
commit
81ec43a923
11 changed files with 90 additions and 78 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"testing"
|
||||
|
||||
magellan "github.com/OpenCHAMI/magellan/internal"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -43,7 +44,10 @@ func TestScanAndCollect(t *testing.T) {
|
|||
}
|
||||
|
||||
// do a collect on the emulator cluster to collect Redfish info
|
||||
magellan.CollectInventory(&results, &magellan.CollectParams{})
|
||||
err := magellan.CollectInventory(&results, &magellan.CollectParams{})
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("failed to collect inventory")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCrawlCommand(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue