From 99626eedd1412eea2660ecd62b7fde266e92f1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandor=20Sz=C3=BCcs?= Date: Wed, 17 Jan 2024 17:06:39 +0100 Subject: [PATCH] test: #4059 detect no change necessary with provider specific config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sandor Szücs --- plan/plan_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plan/plan_test.go b/plan/plan_test.go index 664b4054a8..5aecc8632e 100644 --- a/plan/plan_test.go +++ b/plan/plan_test.go @@ -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}