mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 20:42:33 +02:00
k8s migration: include add notifications in deprecation result (#165)
* fix * ensure newdefaults already present in corefile are not reported
This commit is contained in:
parent
d7f87ddf2a
commit
910ada176e
2 changed files with 33 additions and 7 deletions
|
@ -208,7 +208,6 @@ func TestDeprecated(t *testing.T) {
|
|||
startCorefile := `.:53 {
|
||||
errors
|
||||
health
|
||||
ready
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
upstream
|
||||
|
@ -226,19 +225,19 @@ func TestDeprecated(t *testing.T) {
|
|||
expected := []Notice{
|
||||
{Plugin: "kubernetes", Option: "upstream", Severity: deprecated, Version: "1.4.0"},
|
||||
{Plugin: "proxy", Severity: deprecated, ReplacedBy: "forward", Version: "1.4.0"},
|
||||
{Plugin: "ready", Severity: newdefault, Version: "1.5.0"},
|
||||
{Option: "upstream", Plugin: "kubernetes", Severity: ignored, Version: "1.5.0"},
|
||||
{Plugin: "proxy", Severity: removed, ReplacedBy: "forward", Version: "1.5.0"},
|
||||
{Plugin: "ready", Severity: newdefault, Version: "1.5.0"},
|
||||
}
|
||||
|
||||
result, err := Deprecated("1.3.1", "1.5.0", startCorefile)
|
||||
result, err := Deprecated("1.2.0", "1.5.0", startCorefile)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(result) != len(expected) {
|
||||
t.Fatalf("expected to find %v deprecations; got %v", len(expected), len(result))
|
||||
t.Fatalf("expected to find %v notifications; got %v", len(expected), len(result))
|
||||
}
|
||||
|
||||
for i, dep := range expected {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue