Add pluggable live collectors and simplify API connect form
This commit is contained in:
@@ -30,7 +30,7 @@ func TestApplyArchiveSourceMetadata(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewAPIResultMetadata(t *testing.T) {
|
||||
func TestApplyCollectSourceMetadata(t *testing.T) {
|
||||
req := CollectRequest{
|
||||
Host: "bmc-api.local",
|
||||
Protocol: "redfish",
|
||||
@@ -41,7 +41,12 @@ func TestNewAPIResultMetadata(t *testing.T) {
|
||||
TLSMode: "strict",
|
||||
}
|
||||
|
||||
result := newAPIResult(req)
|
||||
result := &models.AnalysisResult{
|
||||
Events: make([]models.Event, 0),
|
||||
FRU: make([]models.FRUInfo, 0),
|
||||
Sensors: make([]models.SensorReading, 0),
|
||||
}
|
||||
applyCollectSourceMetadata(result, req)
|
||||
|
||||
if result.SourceType != models.SourceTypeAPI {
|
||||
t.Fatalf("expected source type %q, got %q", models.SourceTypeAPI, result.SourceType)
|
||||
|
||||
Reference in New Issue
Block a user