diff --git a/migration/migrate.go b/migration/migrate.go index d0d11a1..38e91a9 100644 --- a/migration/migrate.go +++ b/migration/migrate.go @@ -20,12 +20,18 @@ import ( // any deprecated, removed, or ignored plugins/directives present in the Corefile. Notifications are also returned for // any new default plugins that would be added in a migration. func Deprecated(fromCoreDNSVersion, toCoreDNSVersion, corefileStr string) ([]Notice, error) { + if fromCoreDNSVersion == toCoreDNSVersion { + return nil, nil + } return getStatus(fromCoreDNSVersion, toCoreDNSVersion, corefileStr, SevAll) } // Unsupported returns a list notifications of plugins/options that are not handled supported by this migration tool, // but may still be valid in CoreDNS. func Unsupported(fromCoreDNSVersion, toCoreDNSVersion, corefileStr string) ([]Notice, error) { + if fromCoreDNSVersion == toCoreDNSVersion { + return nil, nil + } return getStatus(fromCoreDNSVersion, toCoreDNSVersion, corefileStr, SevUnsupported) } diff --git a/migration/migrate_test.go b/migration/migrate_test.go index fedce1f..1d71453 100644 --- a/migration/migrate_test.go +++ b/migration/migrate_test.go @@ -858,9 +858,7 @@ func TestUnsupported(t *testing.T) { `, fromVersion: "1.3.1", toVersion: "1.3.1", - expected: []Notice{ - {Plugin: "route53", Severity: SevUnsupported, Version: "1.3.1"}, - }, + expected: []Notice{}, }, { name: "Wrong plugin option",