Skip to content

Commit

Permalink
test validator file suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Dec 19, 2019
1 parent a4d48e7 commit b5118a9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions selfupdate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,25 @@ func TestECDSAValidatorFail(t *testing.T) {
t.Fatal(err)
}
}

func TestValidatorSuffix(t *testing.T) {
for _, test := range []struct {
v Validator
suffix string
}{
{
v: &SHA2Validator{},
suffix: ".sha256",
},
{
v: &ECDSAValidator{},
suffix: ".sig",
},
} {
want := test.suffix
got := test.v.Suffix()
if want != got {
t.Errorf("Wanted %q but got %q", want, got)
}
}
}

0 comments on commit b5118a9

Please sign in to comment.