mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-29 01:58:34 -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
|
@ -10,29 +10,29 @@ import (
|
|||
|
||||
func TestExtractRole(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
metadata map[string]string
|
||||
expectedRole role.Role
|
||||
metadata map[string]string
|
||||
wantRole role.Role
|
||||
}{
|
||||
"coordinator role": {
|
||||
metadata: map[string]string{
|
||||
core.RoleMetadataKey: role.Coordinator.String(),
|
||||
},
|
||||
expectedRole: role.Coordinator,
|
||||
wantRole: role.Coordinator,
|
||||
},
|
||||
"node role": {
|
||||
metadata: map[string]string{
|
||||
core.RoleMetadataKey: role.Node.String(),
|
||||
},
|
||||
expectedRole: role.Node,
|
||||
wantRole: role.Node,
|
||||
},
|
||||
"unknown role": {
|
||||
metadata: map[string]string{
|
||||
core.RoleMetadataKey: "some-unknown-role",
|
||||
},
|
||||
expectedRole: role.Unknown,
|
||||
wantRole: role.Unknown,
|
||||
},
|
||||
"no role": {
|
||||
expectedRole: role.Unknown,
|
||||
wantRole: role.Unknown,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ func TestExtractRole(t *testing.T) {
|
|||
|
||||
role := ExtractRole(tc.metadata)
|
||||
|
||||
assert.Equal(tc.expectedRole, role)
|
||||
assert.Equal(tc.wantRole, role)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue