mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-23 06:05:02 -04:00
Ref/want err from err expected (#82)
consistent naming for test values using 'want' instead of 'expect/ed'
This commit is contained in:
parent
6265b307af
commit
51068abc27
91 changed files with 2319 additions and 2319 deletions
|
@ -22,7 +22,7 @@ func TestTLSConfig(t *testing.T) {
|
|||
testCases := map[string]struct {
|
||||
issuer Issuer
|
||||
validators []Validator
|
||||
expectErr bool
|
||||
wantErr bool
|
||||
}{
|
||||
"basic": {
|
||||
issuer: fakeIssuer{fakeOID: oid1},
|
||||
|
@ -35,12 +35,12 @@ func TestTLSConfig(t *testing.T) {
|
|||
"validate error": {
|
||||
issuer: fakeIssuer{fakeOID: oid1},
|
||||
validators: []Validator{fakeValidator{fakeOID: oid1, err: errors.New("failed")}},
|
||||
expectErr: true,
|
||||
wantErr: true,
|
||||
},
|
||||
"unknown oid": {
|
||||
issuer: fakeIssuer{fakeOID: oid1},
|
||||
validators: []Validator{fakeValidator{fakeOID: oid2}},
|
||||
expectErr: true,
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ func TestTLSConfig(t *testing.T) {
|
|||
req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, server.URL, http.NoBody)
|
||||
require.NoError(err)
|
||||
resp, err := client.Do(req)
|
||||
if tc.expectErr {
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue