mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 22:16:15 +03:00
admin: Add version to service Status API response (#3605)
Add server's version field to service status API:
"version":{
"version":"DEVELOPMENT.GOGET",
"commitID":"DEVELOPMENT.GOGET"
}
This commit is contained in:
committed by
Harshavardhana
parent
e1f64141a2
commit
d1d89116f1
@@ -227,8 +227,11 @@ func testServicesCmdHandler(cmd cmdType, args map[string]interface{}, t *testing
|
||||
adminTestBed.mux.ServeHTTP(rec, req)
|
||||
|
||||
if cmd == statusCmd {
|
||||
expectedInfo := newObjectLayerFn().StorageInfo()
|
||||
receivedInfo := StorageInfo{}
|
||||
expectedInfo := ServerStatus{
|
||||
StorageInfo: newObjectLayerFn().StorageInfo(),
|
||||
ServerVersion: ServerVersion{Version: Version, CommitID: CommitID},
|
||||
}
|
||||
receivedInfo := ServerStatus{}
|
||||
if jsonErr := json.Unmarshal(rec.Body.Bytes(), &receivedInfo); jsonErr != nil {
|
||||
t.Errorf("Failed to unmarshal StorageInfo - %v", jsonErr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user