|
@@ -60,6 +60,7 @@ func TestLogLine_Assign(t *testing.T) {
|
|
|
{input: "UDP_MISS_NOFETCH", wantLine: logLine{cacheCode: "UDP_MISS_NOFETCH"}},
|
|
|
{input: "UDP_INVALID", wantLine: logLine{cacheCode: "UDP_INVALID"}},
|
|
|
{input: "NONE", wantLine: logLine{cacheCode: "NONE"}},
|
|
|
+ {input: "NONE_NONE", wantLine: logLine{cacheCode: "NONE_NONE"}},
|
|
|
{input: emptyStr, wantLine: emptyLogLine},
|
|
|
{input: hyphen, wantLine: emptyLogLine, wantErr: errBadCacheCode},
|
|
|
{input: "TCP", wantLine: emptyLogLine, wantErr: errBadCacheCode},
|
|
@@ -173,8 +174,8 @@ func TestLogLine_Assign(t *testing.T) {
|
|
|
{input: "video/3gpp", wantLine: logLine{mimeType: "video"}},
|
|
|
{input: emptyStr, wantLine: emptyLogLine},
|
|
|
{input: hyphen, wantLine: emptyLogLine},
|
|
|
- {input: "example/example", wantLine: emptyLogLine, wantErr: errBadMimeType},
|
|
|
- {input: "unknown/example", wantLine: emptyLogLine, wantErr: errBadMimeType},
|
|
|
+ {input: "example/example", wantLine: emptyLogLine},
|
|
|
+ {input: "unknown/example", wantLine: emptyLogLine},
|
|
|
{input: "audio", wantLine: emptyLogLine, wantErr: errBadMimeType},
|
|
|
{input: "/", wantLine: emptyLogLine, wantErr: errBadMimeType},
|
|
|
},
|
|
@@ -274,6 +275,7 @@ func TestLogLine_verify(t *testing.T) {
|
|
|
{input: "UDP_MISS_NOFETCH"},
|
|
|
{input: "UDP_INVALID"},
|
|
|
{input: "NONE"},
|
|
|
+ {input: "NONE_NONE"},
|
|
|
{input: emptyStr},
|
|
|
{input: "TCP", wantErr: errBadCacheCode},
|
|
|
{input: "UDP", wantErr: errBadCacheCode},
|