()
| 685 | } |
| 686 | |
| 687 | func getTestCache() *collMetaFieldCache { |
| 688 | cache := make(map[string]string) |
| 689 | cache["ftsIndexA$colA"] = "_$suid_$cuidA" |
| 690 | cache["ftsIndexB$colA"] = "_$suid_$cuidA" |
| 691 | cache["ftsIndexB$colB"] = "_$suid_$cuidB" |
| 692 | cache["ftsIndexB$colC"] = "_$suid_$cuidC" |
| 693 | |
| 694 | indexCache := make(map[string]*sourceDetails) |
| 695 | sdm := &sourceDetails{scopeName: "test", |
| 696 | collUIDNameMap: make(map[uint32]string)} |
| 697 | sdm.collUIDNameMap[1] = "colA" |
| 698 | sdm.collUIDNameMap[2] = "colB" |
| 699 | indexCache["ftsIndexA"] = sdm |
| 700 | sdm = &sourceDetails{scopeName: "test", |
| 701 | collUIDNameMap: make(map[uint32]string)} |
| 702 | sdm.collUIDNameMap[1] = "colA" |
| 703 | sdm.collUIDNameMap[2] = "colB" |
| 704 | sdm.collUIDNameMap[3] = "colC" |
| 705 | indexCache["ftsIndexB"] = sdm |
| 706 | |
| 707 | testCache := &collMetaFieldCache{} |
| 708 | testCache.cache = cache |
| 709 | testCache.sourceDetailsMap = indexCache |
| 710 | return testCache |
| 711 | } |
| 712 | |
| 713 | func TestCollectionSearchRequest(t *testing.T) { |
| 714 | testCache := getTestCache() |
no outgoing calls
no test coverage detected