better variable names in test function
This commit is contained in:
parent
75bd3c6951
commit
3515afa994
|
@ -532,17 +532,17 @@ func TestDefaultKeyPairBuilder_SetPrivateKey_Override(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
supportedKeyTypes := []KeyPairType{Rsa, Dsa}
|
supportedKeyTypes := []KeyPairType{Rsa, Dsa}
|
||||||
for _, kt := range supportedKeyTypes {
|
for _, keyType := range supportedKeyTypes {
|
||||||
for s, l := range pemData {
|
for pemString, expectedResult := range pemData {
|
||||||
kp, err := NewKeyPairBuilder().
|
kp, err := NewKeyPairBuilder().
|
||||||
SetPrivateKey([]byte(s)).
|
SetPrivateKey([]byte(pemString)).
|
||||||
SetName(name).
|
SetName(name).
|
||||||
SetType(kt).
|
SetType(keyType).
|
||||||
Build()
|
Build()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
err = l.matches(kp)
|
err = expectedResult.matches(kp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue