Skip to content

Commit 09e6137

Browse files
committed
add test cases and go fakes
1 parent 35a5c88 commit 09e6137

20 files changed

+41
-306
lines changed

controllers/lrp_convergence_controller_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ var _ = Describe("LRP Convergence Controllers", func() {
262262

263263
It("transition the LRP to UNCLAIMED state", func() {
264264
Eventually(fakeLRPDB.UnclaimActualLRPCallCount).Should(Equal(1))
265-
_, _, actualKey := fakeLRPDB.UnclaimActualLRPArgsForCall(0)
265+
_, _, isStale, actualKey := fakeLRPDB.UnclaimActualLRPArgsForCall(0)
266266
Expect(actualKey).To(Equal(key))
267+
Expect(isStale).To(BeTrue())
267268
})
268269

269270
It("emits an LRPChanged event", func() {
@@ -541,6 +542,8 @@ var _ = Describe("LRP Convergence Controllers", func() {
541542

542543
It("unclaims the suspect replacement lrp", func() {
543544
Expect(fakeLRPDB.UnclaimActualLRPCallCount()).To(Equal(1))
545+
_, _, isStale, _ := fakeLRPDB.UnclaimActualLRPArgsForCall(0)
546+
Expect(isStale).To(BeFalse())
544547
})
545548

546549
It("does not emit change events", func() {

db/dbfakes/fake_actual_lrpdb.go

Lines changed: 12 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/dbfakes/fake_db.go

Lines changed: 12 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/dbfakes/fake_desired_lrpdb.go

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/dbfakes/fake_domain_db.go

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/dbfakes/fake_encryption_db.go

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/dbfakes/fake_evacuation_db.go

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)