(t *testing.T)
| 876 | } |
| 877 | |
| 878 | func TestAttributesMissingMsg(t *testing.T) { |
| 879 | reg := newTestRegistry(t) |
| 880 | attrs := NewAttributeFactory(containers.DefaultContainer, reg, reg) |
| 881 | anyPB, _ := anypb.New(&proto3pb.TestAllTypes{}) |
| 882 | vars, _ := NewActivation(map[string]any{ |
| 883 | "missing_msg": anyPB, |
| 884 | }) |
| 885 | |
| 886 | // missing_msg.field |
| 887 | attr := attrs.AbsoluteAttribute(1, "missing_msg") |
| 888 | field := makeQualifier(t, attrs, nil, 2, "field") |
| 889 | attr.AddQualifier(field) |
| 890 | out, err := attr.Resolve(vars) |
| 891 | if err == nil { |
| 892 | t.Fatalf("got %v, wanted error", out) |
| 893 | } |
| 894 | if err.Error() != "unknown type: 'google.expr.proto3.test.TestAllTypes'" { |
| 895 | t.Fatalf("got %v, wanted unknown type: 'google.expr.proto3.test.TestAllTypes'", err) |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | func TestAttributeMissingMsgUnknownField(t *testing.T) { |
| 900 | reg := newTestRegistry(t) |
nothing calls this directly
no test coverage detected