@@ -53,8 +53,10 @@ func TestRule(t *testing.T) {
5353 assert .Nilf (t , err , "unexpected error: %v" , err )
5454 assert .Equal (t , r1 .Labels , m .Labels , "empty matcher should have matched empty features" )
5555
56- _ , err = Execute (r2 , f , true )
57- assert .Error (t , err , "matching against a missing feature should have returned an error" )
56+ m , err = Execute (r2 , f , true )
57+ assert .NoError (t , err , "matching against a missing feature should not have returned an error" )
58+ assert .Empty (t , m .Labels )
59+ assert .Empty (t , m .Vars )
5860
5961 // Test properly initialized empty features
6062 f = nfdv1alpha1 .NewFeatures ()
@@ -64,8 +66,10 @@ func TestRule(t *testing.T) {
6466 assert .Equal (t , r1 .Labels , m .Labels , "empty matcher should have matched empty features" )
6567 assert .Empty (t , r1 .Vars , "vars should be empty" )
6668
67- _ , err = Execute (r2 , f , true )
68- assert .Error (t , err , "matching against a missing feature type should have returned an error" )
69+ m , err = Execute (r2 , f , true )
70+ assert .NoError (t , err , "matching against a missing feature should not have returned an error" )
71+ assert .Empty (t , m .Labels )
72+ assert .Empty (t , m .Vars )
6973
7074 // Test empty feature sets
7175 f .Flags ["domain-1.kf-1" ] = nfdv1alpha1 .NewFlagFeatures ()
0 commit comments