Check sync error in unit test properly
Tests must fail when syncContent() returns success and error was expected.
This commit is contained in:
@@ -50,6 +50,7 @@ func TestSyncContent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
expectedListCalls: []listCall{{"sid1-1", map[string]string{}, true, time.Now(), 1, nil}},
|
||||
expectSuccess: true,
|
||||
errors: noerrors,
|
||||
test: testSyncContent,
|
||||
},
|
||||
@@ -78,6 +79,7 @@ func TestSyncContent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
expectedListCalls: []listCall{{"sid1-2", map[string]string{}, true, time.Now(), 1, nil}},
|
||||
expectSuccess: true,
|
||||
errors: noerrors,
|
||||
test: testSyncContent,
|
||||
},
|
||||
@@ -140,6 +142,7 @@ func TestSyncContent(t *testing.T) {
|
||||
size: defaultSize,
|
||||
},
|
||||
},
|
||||
expectSuccess: true,
|
||||
initialSecrets: []*v1.Secret{secret()},
|
||||
expectedEvents: noevents,
|
||||
errors: noerrors,
|
||||
|
Reference in New Issue
Block a user