Skip to content

Commit

Permalink
drop obsolete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Dec 10, 2024
1 parent 64ec64d commit 3ee8edf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 79 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ For every DNS record, there was an additional `TXT` DNS record ("metadata record
It was decided to remove this feature, as it doubles the number of DNS records without adding
enough value.
In the release `v0.23`, it is still important to specify the `--identifier` option for the compound DNSq
In the release `v0.23`, it is still important to specify the `--identifier` option for the compound DNS
Provisioning Controller and also to keep the `DNSOwner` resources as they are used to clean up the "metadata records".
In the future, the `DNSOwner` resources will be removed completely.
Expand Down Expand Up @@ -515,13 +515,13 @@ The following provider types can be selected (comma separated):
- `remote`: Remote DNS provider (a dns-controller-manager with enabled remote access service)
- `powerdns`: PowerDNS provider
If the compound DNS Provisioning Controller is enabled it is important to specify a
unique controller identity using the `--identifier` option.
This identifier is stored in the DNS system to identify the DNS entries
managed by a dedicated controller. There should never be two
DNS controllers with the same identifier running at the same time for the
same DNS domains/accounts. In release `v0.23`, the `--identifier` option is only used to
cleanup the "metadata records" created by the DNS Provisioning Controller.
If the compound DNS Provisioning Controller is enabled, a unique controller identity was specified using the
`--identifier` option in former release.
This identifier was used to tag the DNS entries managed by a dedicated controller by creating additional
"metadata `TXT` records" in the DNS system.
Starting with release `v0.23`, this feature has been dropped as it doubles the number of DNS records.
It is still important and required to specify the `--identifier` option to enable the cleanup of "metadata records"
created by former releases of the DNS Provisioning Controller.
Here is the complete list of options provided:
Expand Down
61 changes: 1 addition & 60 deletions test/integration/entryLivecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,46 +104,6 @@ var _ = Describe("EntryLivecycle", func() {
Ω(err).ShouldNot(HaveOccurred())
})

It("is handled only by owner", func() {
pr, domain, _, err := testEnv.CreateSecretAndProvider("inmemory.mock", 0)
Ω(err).ShouldNot(HaveOccurred())

defer testEnv.DeleteProviderAndSecret(pr)

e, err := testEnv.CreateEntry(0, domain)
Ω(err).ShouldNot(HaveOccurred())
defer testEnv.DeleteEntryAndWait(e)

checkProvider(pr)

checkEntry(e, pr)

ownerID := "my/owner1"
e, err = testEnv.UpdateEntryOwner(e, &ownerID)
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.AwaitEntryStale(e.GetName())
Ω(err).ShouldNot(HaveOccurred())

owner1, err := testEnv.CreateOwner("owner1", ownerID)
Ω(err).ShouldNot(HaveOccurred())

defer func() { _ = owner1.Delete() }()

err = testEnv.AwaitEntryReady(e.GetName())
Ω(err).ShouldNot(HaveOccurred())

ownerID2 := "my/owner2"
e, err = testEnv.UpdateEntryOwner(e, &ownerID2)
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.AwaitEntryStale(e.GetName())
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.DeleteEntryAndWait(e)
Ω(err).ShouldNot(HaveOccurred())
})

It("handles an entry without targets as invalid and can delete it", func() {
pr, domain, _, err := testEnv.CreateSecretAndProvider("inmemory.mock", 0)
Ω(err).ShouldNot(HaveOccurred())
Expand Down Expand Up @@ -174,7 +134,7 @@ var _ = Describe("EntryLivecycle", func() {
Ω(err).ShouldNot(HaveOccurred())
})

It("handles entry correctly from ready -> stale -> invalid -> ready", func() {
It("handles entry correctly from ready -> invalid -> ready", func() {
pr, domain, _, err := testEnv.CreateSecretAndProvider("inmemory.mock", 0)
Ω(err).ShouldNot(HaveOccurred())

Expand All @@ -188,31 +148,12 @@ var _ = Describe("EntryLivecycle", func() {

checkEntry(e, pr)

ownerID := "my/owner1"
e, err = testEnv.UpdateEntryOwner(e, &ownerID)
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.AwaitEntryStale(e.GetName())
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.MockInMemoryHasEntry(e)
Ω(err).ShouldNot(HaveOccurred())

e, err = testEnv.UpdateEntryTargets(e)
Ω(err).ShouldNot(HaveOccurred())

e, err = testEnv.UpdateEntryOwner(e, nil)
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.AwaitEntryInvalid(e.GetName())
Ω(err).ShouldNot(HaveOccurred())

err = testEnv.Await("entry still in mock provider", func() (bool, error) {
err := testEnv.MockInMemoryHasNotEntry(e)
return err == nil, err
})
Ω(err).ShouldNot(HaveOccurred())

e, err = testEnv.UpdateEntryTargets(e, "1.1.1.1")
Ω(err).ShouldNot(HaveOccurred())

Expand Down
11 changes: 0 additions & 11 deletions test/integration/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,6 @@ func (te *TestEnv) CreateEntryGeneric(index int, specSetter EntrySpecSetter) (re
return obj, err
}

func (te *TestEnv) UpdateEntryOwner(obj resources.Object, ownerID *string) (resources.Object, error) {
obj, err := te.GetEntry(obj.GetName())
if err != nil {
return nil, err
}
e := UnwrapEntry(obj)
e.Spec.OwnerId = ownerID
err = obj.Update()
return obj, err
}

func (te *TestEnv) UpdateEntryDomain(obj resources.Object, domain string) (resources.Object, error) {
obj, err := te.GetEntry(obj.GetName())
if err != nil {
Expand Down

0 comments on commit 3ee8edf

Please sign in to comment.