(t *testing.T)
| 1024 | } |
| 1025 | |
| 1026 | func TestQueryFileConstraint_WholeRef(t *testing.T) { |
| 1027 | testQueryTypes(t, memIndexTypes, func(qt *queryTest) { |
| 1028 | id := qt.id |
| 1029 | fileRef, _ := id.UploadFile("some-stuff.txt", "hello", time.Unix(123, 0)) |
| 1030 | qt.t.Logf("fileRef = %q", fileRef) |
| 1031 | p1 := id.NewPlannedPermanode("1") |
| 1032 | id.SetAttribute(p1, "camliContent", fileRef.String()) |
| 1033 | |
| 1034 | fileRef2, _ := id.UploadFile("other-file", "hellooooo", time.Unix(456, 0)) |
| 1035 | qt.t.Logf("fileRef2 = %q", fileRef2) |
| 1036 | p2 := id.NewPlannedPermanode("2") |
| 1037 | id.SetAttribute(p2, "camliContent", fileRef2.String()) |
| 1038 | |
| 1039 | sq := &SearchQuery{ |
| 1040 | Constraint: &Constraint{ |
| 1041 | Permanode: &PermanodeConstraint{ |
| 1042 | Attr: "camliContent", |
| 1043 | ValueInSet: &Constraint{ |
| 1044 | File: &FileConstraint{ |
| 1045 | WholeRef: blob.RefFromString("hello"), |
| 1046 | }, |
| 1047 | }, |
| 1048 | }, |
| 1049 | }, |
| 1050 | } |
| 1051 | qt.wantRes(sq, p1) |
| 1052 | }) |
| 1053 | } |
| 1054 | |
| 1055 | func TestQueryPermanodeModtime(t *testing.T) { |
| 1056 | testQuery(t, func(qt *queryTest) { |
nothing calls this directly
no test coverage detected