fix (test): broken test fix

This commit is contained in:
Mickael Kerjean 2020-07-01 01:57:25 +10:00
parent fa6c9b068f
commit a4f2141087
3 changed files with 13 additions and 4 deletions

View file

@ -61,7 +61,7 @@ steps:
- npm install --silent
- npm test
- name: test_backend
- name: test_backend_unit
image: golang:1.12-alpine
depends_on: [ test_prepare, build_backend, build_frontend ]
environment:
@ -71,6 +71,15 @@ steps:
- cp ./test/assets/* /tmp/
- go test -mod=vendor -v --tags "fts5" ./test/unit_go/...
- name: test_backend_integration
image: golang:1.12-alpine
depends_on: [ test_prepare, build_backend, build_frontend ]
environment:
GO111MODULE: "on"
commands:
- apk add git gcc libc-dev poppler-utils > /dev/null
- go test -mod=vendor -v ./test/integration_go/
- name: test_e2e
image: machines/puppeteer
depends_on: [ test_prepare, build_backend, build_frontend ]
@ -87,7 +96,7 @@ steps:
- name: release_prepare
image: debian:stable-slim
depends_on: [ test_frontend, test_backend, test_e2e ]
depends_on: [ test_frontend, test_backend_unit, test_backend_integration, test_e2e ]
environment:
GPG_PRIVATE:
from_secret: GPG_PRIVATE

View file

@ -20,7 +20,7 @@ func FileSearch(ctx App, res http.ResponseWriter, req *http.Request) {
var searchResults []File
if Config.Get("features.search.enable").Bool() {
searchResults = model.SearchStateFull(&ctx, path, q)
searchResults = model.SearchStateful(&ctx, path, q)
} else {
searchResults = model.SearchStateLess(&ctx, path, q)
}

View file

@ -175,7 +175,7 @@ func init(){
}
}
func SearchStateFull(app *App, path string, keyword string) []File {
func SearchStateful(app *App, path string, keyword string) []File {
var files []File = make([]File, 0)
// extract our search indexer