fix(redfish): fixed failures on redfish protocol validator#823
fix(redfish): fixed failures on redfish protocol validator#823DevipriyaS17 wants to merge 3 commits intoredfishfrom
Conversation
1600a7d to
7270d18
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
redfish/component.go
Outdated
| Middlewares: middlewares, | ||
| }) | ||
|
|
||
| // Register /redfish endpoint manually (required by Redfish protocol) |
There was a problem hiding this comment.
Is this the right way to add or should it be updated in the spec so that the code gets generated automatically.
There was a problem hiding this comment.
updated via specs
redfish/component.go
Outdated
|
|
||
| // Per Redfish spec: POST to collection/Members is equivalent to POST to collection | ||
| // Add this route to support protocol validator requirements | ||
| router.POST("/redfish/v1/SessionService/Sessions/Members", server.PostRedfishV1SessionServiceSessions) |
There was a problem hiding this comment.
Same as the previous comment.
Is this the right way to add or should it be updated in the spec so that the code gets generated automatically.
There was a problem hiding this comment.
updated via specs
…oint and computer system boot
| clearEnv() // Clear environment variables before setting new ones | ||
|
|
||
| // Create a temporary config file | ||
| //nolint:gosec // Test fixture with dummy credentials |
There was a problem hiding this comment.
Changes like this which are not redfish specific need to be fixed on main
| var err error | ||
|
|
||
| if tc.method == http.MethodPost || tc.method == http.MethodPatch { | ||
| //nolint:gosec // Test fixture marshaling request body with test credentials |
There was a problem hiding this comment.
Changes like this which are not redfish specific need to be fixed on main
| var err error | ||
|
|
||
| if tc.method == http.MethodPost || tc.method == http.MethodPatch { | ||
| //nolint:gosec // Test fixture marshaling request body with test credentials |
There was a problem hiding this comment.
Changes like this which are not redfish specific need to be fixed on main
| deviceManagement.EXPECT().GetKVMScreenSettings(context.Background(), "guid1").Return(dto.KVMScreenSettings{Displays: []dto.KVMScreenDisplay{{DisplayIndex: 0, IsActive: true}}}, nil) | ||
|
|
||
| req := httptest.NewRequest(http.MethodGet, "/api/v1/amt/kvm/displays/guid1", http.NoBody) | ||
| req := httptest.NewRequestWithContext(context.Background(), http.MethodGet, "/api/v1/amt/kvm/displays/guid1", http.NoBody) |
There was a problem hiding this comment.
Changes like this which are not redfish specific need to be fixed on main
| }) | ||
|
|
||
| req := httptest.NewRequest(http.MethodGet, "/test", http.NoBody) | ||
| req := httptest.NewRequestWithContext(context.Background(), http.MethodGet, "/test", http.NoBody) |
There was a problem hiding this comment.
This change why is it needed, its not there on main ?
|
|
||
| // GetRedfish handles GET /redfish | ||
| // Returns protocol version information. Must be publicly accessible without authentication. | ||
| func (s *RedfishServer) GetRedfish(c *gin.Context) { |
Fixed 17 of 20 DMTF Protocol Validator failures.
Results
FAIL: 20 → 3