Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
155
Issues
155
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
dd22584b
Verified
Commit
dd22584b
authored
Aug 21, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] simple worker unit tests
parent
1281c36d
Pipeline
#6517
failed with stages
in 12 minutes and 2 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
gargantext.cabal
gargantext.cabal
+1
-0
gargantext-settings.toml
test-data/gargantext-settings.toml
+2
-0
Worker.hs
test/Test/Core/Worker.hs
+31
-0
Main.hs
test/drivers/tasty/Main.hs
+2
-0
No files found.
gargantext.cabal
View file @
dd22584b
...
...
@@ -887,6 +887,7 @@ test-suite garg-test-tasty
Test.Core.Text.Examples
Test.Core.Text.Flow
Test.Core.Utils
Test.Core.Worker
Test.Database.Operations
Test.Database.Operations.DocumentSearch
Test.Database.Operations.NodeStory
...
...
test-data/gargantext-settings.toml
View file @
dd22584b
...
...
@@ -22,3 +22,5 @@ use-origins-for-hosts = true
[microservices.proxy]
port
=
8009
enabled
=
false
[worker]
\ No newline at end of file
test/Test/Core/Worker.hs
0 → 100644
View file @
dd22584b
{-|
Module : Test.Core.Worker
Description :
Copyright : (c) CNRS, 2024-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
Test.Core.Worker
where
import
Data.Aeson
qualified
as
Aeson
import
Gargantext.Core.Methods.Similarities.Conditional
import
Gargantext.Core.Worker.Jobs
(
Job
(
..
))
import
Gargantext.Prelude
import
Test.Tasty
import
Test.Tasty.HUnit
import
Test.Tasty.QuickCheck
hiding
(
Positive
,
Negative
)
instance
Arbitrary
Job
where
arbitrary
=
oneof
[
pure
Ping
]
tests
::
TestTree
tests
=
testGroup
"worker unit tests"
[
testProperty
"Worker Job to/from JSON serialization is correct"
$
\
job
->
Aeson
.
decode
(
Aeson
.
encode
(
job
::
Job
))
==
Just
job
]
test/drivers/tasty/Main.hs
View file @
dd22584b
...
...
@@ -15,6 +15,7 @@ import Gargantext.Prelude
import
qualified
Test.Core.Text.Corpus.Query
as
CorpusQuery
import
qualified
Test.Core.Text.Corpus.TSV
as
TSVParser
import
qualified
Test.Core.Utils
as
Utils
import
qualified
Test.Core.Worker
as
Worker
import
qualified
Test.Graph.Clustering
as
Graph
import
qualified
Test.Ngrams.NLP
as
NLP
import
qualified
Test.Ngrams.Query
as
NgramsQuery
...
...
@@ -55,4 +56,5 @@ main = do
,
similaritySpec
,
Phylo
.
tests
,
testGroup
"Stemming"
[
Lancaster
.
tests
]
,
Worker
.
tests
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment