fixed issues with CA now generates its own new cert
All checks were successful
release / build-and-upload (push) Successful in 16m53s
All checks were successful
release / build-and-upload (push) Successful in 16m53s
This commit is contained in:
parent
a930a697fa
commit
c1948a1439
11 changed files with 458 additions and 34 deletions
30
apps/capture/capturecmd/args_test.go
Normal file
30
apps/capture/capturecmd/args_test.go
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package capturecmd
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNormalizeArgsUnicodeDashes(t *testing.T) {
|
||||
in := []string{"\u2014app", "bbc", "\u2013channel", "bbcone"}
|
||||
out := normalizeArgs(in)
|
||||
if out[0] != "--app" {
|
||||
t.Fatalf("em-dash app: got %q want --app", out[0])
|
||||
}
|
||||
if out[1] != "bbc" {
|
||||
t.Fatalf("app value: got %q", out[1])
|
||||
}
|
||||
if out[2] != "--channel" {
|
||||
t.Fatalf("en-dash channel: got %q want --channel", out[2])
|
||||
}
|
||||
if out[3] != "bbcone" {
|
||||
t.Fatalf("channel value: got %q", out[3])
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeArgsASCIIUnchanged(t *testing.T) {
|
||||
in := []string{"--app", "bbc", "--channel", "bbcone"}
|
||||
out := normalizeArgs(in)
|
||||
for i := range in {
|
||||
if out[i] != in[i] {
|
||||
t.Fatalf("index %d: got %q want %q", i, out[i], in[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue