(t *testing.T)
| 1068 | } |
| 1069 | |
| 1070 | func TestAttributesMissingMsg(t *testing.T) { |
| 1071 | reg := newTestRegistry(t) |
| 1072 | attrs := NewAttributeFactory(containers.DefaultContainer, reg, reg) |
| 1073 | anyPB, _ := anypb.New(&proto3pb.TestAllTypes{}) |
| 1074 | vars, _ := NewActivation(map[string]any{ |
| 1075 | "missing_msg": anyPB, |
| 1076 | }) |
| 1077 | |
| 1078 | // missing_msg.field |
| 1079 | attr := attrs.AbsoluteAttribute(1, "missing_msg") |
| 1080 | field := makeQualifier(t, attrs, nil, 2, "field") |
| 1081 | attr.AddQualifier(field) |
| 1082 | out, err := attr.Resolve(vars) |
| 1083 | if err == nil { |
| 1084 | t.Fatalf("got %v, wanted error", out) |
| 1085 | } |
| 1086 | if err.Error() != "unknown type: 'google.expr.proto3.test.TestAllTypes'" { |
| 1087 | t.Fatalf("got %v, wanted unknown type: 'google.expr.proto3.test.TestAllTypes'", err) |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | func TestAttributeMissingMsgUnknownField(t *testing.T) { |
| 1092 | reg := newTestRegistry(t) |
nothing calls this directly
no test coverage detected