Debian Codegraph @

storage/internal/auth/authorizer_shared_key_lite_test.go

raw symbols SCIP
1 package authscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/auth`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.13 testing/"
5 )
6
7 func TestBuildCanonicalizedStringForSharedKeyLitescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/auth`/TestBuildCanonicalizedStringForSharedKeyLite().(t *testingscip-go gomod github.com/golang/go/src go1.13 testing/.Tscip-go gomod github.com/golang/go/src go1.13 testing/T#) {
8 testData := []struct {
9 name string
10 headers map[string][]string
11 canonicalizedHeaders string
12 canonicalizedResource string
13 verb string
14 expected string
15 }{
16 {
17 name: "completed",
18 verb: "NOM",
19 headers: map[string][]string{
20 "Content-MD5": {"abc123"},
21 "Content-Type": {"vnd/panda-pops+v1"},
22 },
23 canonicalizedHeaders: "all-the-headers",
24 canonicalizedResource: "all-the-resources",
25 expected: "NOM\n\nvnd/panda-pops+v1\n\nall-the-headers\nall-the-resources",
26 },
27 }
28
29 for _, test := range testData {
30 t.Logfscip-go gomod github.com/golang/go/src go1.13 testing/common#Logf().("Test: %q", test.name)
31 actual := buildCanonicalizedStringForSharedKeyLitescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/auth`/buildCanonicalizedStringForSharedKeyLite().(test.verb, test.headers, test.canonicalizedHeaders, test.canonicalizedResource)
32 if actual != test.expected {
33 t.Fatalfscip-go gomod github.com/golang/go/src go1.13 testing/common#Fatalf().("Expected %q but got %q", test.expected, actual)
34 }
35 }
36 }