Skip to content

Commit

Permalink
tika setup for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nabim777 committed Jul 14, 2023
1 parent 905df28 commit 302fd15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ config = {
"OCIS_ADD_RUN_SERVICES": "antivirus",
},
},
"apiFullTextSearch": {
"suites": [
"apiFullTextSearch",
],
"skip": False,
"tikaNeeded": True,
},
},
"apiTests": {
"numberOfParts": 10,
Expand Down Expand Up @@ -735,6 +742,7 @@ def localApiTestPipeline(ctx):
"accounts_hash_difficulty": 4,
"emailNeeded": False,
"antivirusNeeded": False,
"tikaNeeded": False,
}

if "localApiTests" in config:
Expand All @@ -755,7 +763,8 @@ def localApiTestPipeline(ctx):
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"], with_wrapper = True) +
(tikaService() if params["tikaNeeded"] else []) +
(ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = True) if params["tikaNeeded"] else ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"], with_wrapper = True)) +
(waitForClamavService() if params["antivirusNeeded"] else []) +
(waitForEmailService() if params["emailNeeded"] else []) +
localApiTests(suite, storage, params["extraEnvironment"]),
Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/features/apiFullTextSearch/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ Feature: full text search

Scenario Outline: search files by content
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "hello world" to "file1.txt"
And user "Alice" has uploaded file with content "Namaste nepal" to "file2.txt"
And user "Alice" has uploaded file with content "hello nepal" to "file3.txt"
And user "Alice" has uploaded file with content "hello world from nepal" to "file1.txt"
And user "Alice" has uploaded file with content "saying hello to the world" to "file2.txt"
And user "Alice" has uploaded file with content "nepal want to say hello" to "file3.txt"
And user "Alice" has uploaded file with content "namaste from nepal" to "hello.txt"
When user "Alice" searches for "Content:hello" using the WebDAV API
Then the HTTP status code should be "207"
And the search result of user "Alice" should contain only these files:
| file1.txt |
| file2.txt |
| file3.txt |
Examples:
| dav-path-version |
Expand Down

0 comments on commit 302fd15

Please sign in to comment.