(in *pb.Query, out *pb.QueryResult)
| 42 | ) |
| 43 | |
| 44 | func fakeRunQuery(in *pb.Query, out *pb.QueryResult) error { |
| 45 | expectedIn := &pb.Query{ |
| 46 | App: proto.String("dev~fake-app"), |
| 47 | Kind: proto.String("Gopher"), |
| 48 | Compile: proto.Bool(true), |
| 49 | } |
| 50 | if !proto.Equal(in, expectedIn) { |
| 51 | return fmt.Errorf("unsupported argument: got %v want %v", in, expectedIn) |
| 52 | } |
| 53 | *out = pb.QueryResult{ |
| 54 | Result: []*pb.EntityProto{ |
| 55 | { |
| 56 | Key: &pb.Reference{ |
| 57 | App: proto.String("s~test-app"), |
| 58 | Path: path1, |
| 59 | }, |
| 60 | EntityGroup: path1, |
| 61 | Property: []*pb.Property{ |
| 62 | { |
| 63 | Meaning: pb.Property_TEXT.Enum(), |
| 64 | Name: proto.String("Name"), |
| 65 | Value: &pb.PropertyValue{ |
| 66 | StringValue: proto.String("George"), |
| 67 | }, |
| 68 | }, |
| 69 | { |
| 70 | Name: proto.String("Height"), |
| 71 | Value: &pb.PropertyValue{ |
| 72 | Int64Value: proto.Int64(32), |
| 73 | }, |
| 74 | }, |
| 75 | }, |
| 76 | }, |
| 77 | { |
| 78 | Key: &pb.Reference{ |
| 79 | App: proto.String("s~test-app"), |
| 80 | Path: path2, |
| 81 | }, |
| 82 | EntityGroup: path1, // ancestor is George |
| 83 | Property: []*pb.Property{ |
| 84 | { |
| 85 | Meaning: pb.Property_TEXT.Enum(), |
| 86 | Name: proto.String("Name"), |
| 87 | Value: &pb.PropertyValue{ |
| 88 | StringValue: proto.String("Rufus"), |
| 89 | }, |
| 90 | }, |
| 91 | // No height for Rufus. |
| 92 | }, |
| 93 | }, |
| 94 | }, |
| 95 | MoreResults: proto.Bool(false), |
| 96 | } |
| 97 | return nil |
| 98 | } |
| 99 | |
| 100 | type StructThatImplementsPLS struct{} |
| 101 |
no test coverage detected
searching dependent graphs…