mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Add User-Agent header with MinIO release details in http logs (#7843)
This would allow http log target server to distinguish between log messages across different versions of MinIO deployments.
This commit is contained in:
committed by
Harshavardhana
parent
1cd801b2e9
commit
bbb56739bd
@@ -500,5 +500,25 @@ func TestLCP(t *testing.T) {
|
||||
t.Fatalf("Test %d: Common prefix found: `%v`, expected: `%v`", i+1, foundPrefix, test.commonPrefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetMinioMode(t *testing.T) {
|
||||
testMinioMode := func(expected string) {
|
||||
if mode := getMinioMode(); mode != expected {
|
||||
t.Fatalf("Expected %s got %s", expected, mode)
|
||||
}
|
||||
}
|
||||
globalIsDistXL = true
|
||||
testMinioMode(globalMinioModeDistXL)
|
||||
|
||||
globalIsDistXL = false
|
||||
globalIsXL = true
|
||||
testMinioMode(globalMinioModeXL)
|
||||
|
||||
globalIsDistXL, globalIsXL = false, false
|
||||
testMinioMode(globalMinioModeFS)
|
||||
|
||||
globalIsGateway, globalGatewayName = true, "azure"
|
||||
testMinioMode(globalMinioModeGatewayPrefix + globalGatewayName)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user