mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-20 12:14:23 -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
|
@ -9,22 +9,22 @@ import (
|
|||
func TestIDs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
testState := testInstances()
|
||||
expectedIDs := []string{"id-9", "id-10", "id-11", "id-12"}
|
||||
assert.ElementsMatch(expectedIDs, testState.IDs())
|
||||
wantIDs := []string{"id-9", "id-10", "id-11", "id-12"}
|
||||
assert.ElementsMatch(wantIDs, testState.IDs())
|
||||
}
|
||||
|
||||
func TestPublicIPs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
testState := testInstances()
|
||||
expectedIPs := []string{"192.0.2.1", "192.0.2.3", "192.0.2.5", "192.0.2.7"}
|
||||
assert.ElementsMatch(expectedIPs, testState.PublicIPs())
|
||||
wantIPs := []string{"192.0.2.1", "192.0.2.3", "192.0.2.5", "192.0.2.7"}
|
||||
assert.ElementsMatch(wantIPs, testState.PublicIPs())
|
||||
}
|
||||
|
||||
func TestPrivateIPs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
testState := testInstances()
|
||||
expectedIPs := []string{"192.0.2.2", "192.0.2.4", "192.0.2.6", "192.0.2.8"}
|
||||
assert.ElementsMatch(expectedIPs, testState.PrivateIPs())
|
||||
wantIPs := []string{"192.0.2.2", "192.0.2.4", "192.0.2.6", "192.0.2.8"}
|
||||
assert.ElementsMatch(wantIPs, testState.PrivateIPs())
|
||||
}
|
||||
|
||||
func TestGetOne(t *testing.T) {
|
||||
|
@ -43,9 +43,9 @@ func TestGetOthers(t *testing.T) {
|
|||
for _, id := range testCases {
|
||||
others := testInstances().GetOthers(id)
|
||||
assert.NotContains(others, id)
|
||||
expectedInstances := testInstances()
|
||||
delete(expectedInstances, id)
|
||||
assert.ElementsMatch(others.IDs(), expectedInstances.IDs())
|
||||
wantInstances := testInstances()
|
||||
delete(wantInstances, id)
|
||||
assert.ElementsMatch(others.IDs(), wantInstances.IDs())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue