From 98fada78e46cdebeb80098ea44aae7b62ce937f3 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 22 Jan 2016 21:26:06 -0500 Subject: [PATCH] Fix test on 1.6 by comparing to nil instead of a nil-defined map --- command/generate-root_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/generate-root_test.go b/command/generate-root_test.go index 36ef3a5898..166b0a0ac5 100644 --- a/command/generate-root_test.go +++ b/command/generate-root_test.go @@ -166,7 +166,7 @@ func TestGenerateRoot_OTP(t *testing.T) { if resp.Data["orphan"].(bool) != true || resp.Data["ttl"].(int64) != 0 || resp.Data["num_uses"].(int) != 0 || - resp.Data["meta"].(map[string]string) != map[string]string(nil) || + resp.Data["meta"].(map[string]string) != nil || len(resp.Data["policies"].([]string)) != 1 || resp.Data["policies"].([]string)[0] != "root" { t.Fatalf("bad: %#v", resp.Data) @@ -270,7 +270,7 @@ func TestGenerateRoot_PGP(t *testing.T) { if resp.Data["orphan"].(bool) != true || resp.Data["ttl"].(int64) != 0 || resp.Data["num_uses"].(int) != 0 || - resp.Data["meta"].(map[string]string) != map[string]string(nil) || + resp.Data["meta"].(map[string]string) != nil || len(resp.Data["policies"].([]string)) != 1 || resp.Data["policies"].([]string)[0] != "root" { t.Fatalf("bad: %#v", resp.Data)