Fix test on 1.6 by comparing to nil instead of a nil-defined map

This commit is contained in:
Jeff Mitchell
2016-01-22 21:26:06 -05:00
parent d343e5f4df
commit 98fada78e4

View File

@@ -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)