fix: Missing nil checks

Fixes #3095
This commit is contained in:
Mike Bryant committed 2017-08-23 01:21:15 +01:00
1 parent 4b5299d124
commit 2555e491e1
2 files changed
+28 -6

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
package npc
import (
"github.com/stretchr/testify/require"
"testing"
)
func TestRegressionHandleNil3095(t *testing.T) {
// Test for handling nil values
// https://github.com/weaveworks/weave/issues/3095
rs := newRuleSpec(nil, nil, nil, nil)
require.NotEqual(t, rs.key, "")
}