MCPcopy
hub / github.com/minio/minio-go / TestIsStandardHeader

Function TestIsStandardHeader

utils_test.go:342–363  ·  view source on GitHub ↗

Tests if header is standard supported header

(t *testing.T)

Source from the content-addressed store, hash-verified

340
341// Tests if header is standard supported header
342func TestIsStandardHeader(t *testing.T) {
343 testCases := []struct {
344 // Input.
345 header string
346 // Expected result.
347 expectedValue bool
348 }{
349 {"content-encoding", true},
350 {"content-type", true},
351 {"cache-control", true},
352 {"content-disposition", true},
353 {"content-language", true},
354 {"random-header", false},
355 }
356
357 for i, testCase := range testCases {
358 actual := isStandardHeader(testCase.header)
359 if actual != testCase.expectedValue {
360 t.Errorf("Test %d: Expected to pass, but failed", i+1)
361 }
362 }
363}
364
365// Tests if header is server encryption header
366func TestIsSSEHeader(t *testing.T) {

Callers

nothing calls this directly

Calls 1

isStandardHeaderFunction · 0.85

Tested by

no test coverage detected