Skip to content

Commit

Permalink
Merge pull request #4189 from kubernetes-sigs/test/plan-should-detect…
Browse files Browse the repository at this point in the history
…-no-change-with-provider-specific-config

test: detect no change necessary with provider specific config
  • Loading branch information
k8s-ci-robot committed Apr 28, 2024
2 parents c506a20 + 99626ee commit 8a64700
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plan/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,23 @@ func (suite *PlanTestSuite) TestSyncSecondRoundWithProviderSpecificChange() {
validateEntries(suite.T(), changes.Delete, expectedDelete)
}

func (suite *PlanTestSuite) TestSyncSecondRoundWithProviderSpecificNoChange() {
current := []*endpoint.Endpoint{suite.bar127AWithProviderSpecificTrue}
desired := []*endpoint.Endpoint{suite.bar127AWithProviderSpecificTrue}

p := &Plan{
Policies: []Policy{&SyncPolicy{}},
Current: current,
Desired: desired,
ManagedRecords: []string{endpoint.RecordTypeA, endpoint.RecordTypeCNAME},
}

changes := p.Calculate().Changes
if changes.HasChanges() {
suite.T().Fatal("test should not have changes")
}
}

func (suite *PlanTestSuite) TestSyncSecondRoundWithProviderSpecificRemoval() {
current := []*endpoint.Endpoint{suite.bar127AWithProviderSpecificFalse}
desired := []*endpoint.Endpoint{suite.bar127AWithProviderSpecificUnset}
Expand Down

0 comments on commit 8a64700

Please sign in to comment.