use mock for search
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
parent
f6fefb0bc1
commit
47c4e542ba
3 changed files with 11 additions and 4 deletions
|
@ -321,7 +321,12 @@ func handlerAuth(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func handlerSearch(w http.ResponseWriter, r *http.Request) {
|
||||
writeResponse(w, "{}", 200)
|
||||
result := &SearchResults{
|
||||
Query: "fakequery",
|
||||
NumResults: 1,
|
||||
Results: []SearchResult{{Name: "fakeimage", StarCount: 42}},
|
||||
}
|
||||
writeResponse(w, result, 200)
|
||||
}
|
||||
|
||||
func TestPing(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue