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
175
Issues
175
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
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
a08e14cc
Commit
a08e14cc
authored
Mar 27, 2025
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address code review feedback
parent
f6e3c251
Pipeline
#7488
passed with stages
in 40 minutes and 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
List.hs
test/Test/API/Private/List.hs
+4
-4
Remote.hs
test/Test/API/Private/Remote.hs
+1
-1
Setup.hs
test/Test/API/Setup.hs
+1
-1
No files found.
test/Test/API/Private/List.hs
View file @
a08e14cc
...
@@ -39,9 +39,9 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
...
@@ -39,9 +39,9 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
describe
"Importing terms as TSV"
$
do
describe
"Importing terms as TSV"
$
do
it
"
[#381] should work (and return a non-empty list of ngrams
"
$
\
(
SpecContext
testEnv
port
app
_
)
->
do
it
"
should work for TSV with a missing 'forms' column
"
$
\
(
SpecContext
testEnv
port
app
_
)
->
do
cId
<-
newCorpusForUser
testEnv
"alice"
cId
<-
newCorpusForUser
testEnv
"alice"
let
log_cfg
=
(
test_config
testEnv
)
^.
gc_logging
let
log_cfg
=
test_config
testEnv
^.
gc_logging
withApplication
app
$
do
withApplication
app
$
do
withValidLogin
port
"alice"
(
GargPassword
"alice"
)
$
\
clientEnv
token
->
do
withValidLogin
port
"alice"
(
GargPassword
"alice"
)
$
\
clientEnv
token
->
do
([
listId
]
::
[
NodeId
])
<-
protectedJSON
token
"POST"
(
mkUrl
port
(
"/node/"
<>
build
cId
))
[
aesonQQ
|
{"pn_typename":"NodeList","pn_name":"Testing"}
|]
([
listId
]
::
[
NodeId
])
<-
protectedJSON
token
"POST"
(
mkUrl
port
(
"/node/"
<>
build
cId
))
[
aesonQQ
|
{"pn_typename":"NodeList","pn_name":"Testing"}
|]
...
@@ -50,8 +50,8 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
...
@@ -50,8 +50,8 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
let
params
=
WithTextFile
{
_wtf_filetype
=
FType
.
TSV
let
params
=
WithTextFile
{
_wtf_filetype
=
FType
.
TSV
,
_wtf_data
=
simpleNgrams
,
_wtf_data
=
simpleNgrams
,
_wtf_name
=
"simple.tsv"
}
,
_wtf_name
=
"simple.tsv"
}
ji
<-
checkEither
$
liftIO
$
runClientM
(
add_tsv_to_list
token
listId
params
)
clientEnv
pendingJob
<-
checkEither
$
liftIO
$
runClientM
(
add_tsv_to_list
token
listId
params
)
clientEnv
_
<-
pollUntilWorkFinished
log_cfg
port
ji
_
<-
pollUntilWorkFinished
log_cfg
port
pendingJob
-- Now check that we can retrieve the ngrams, and the ngrams list is not empty!
-- Now check that we can retrieve the ngrams, and the ngrams list is not empty!
liftIO
$
do
liftIO
$
do
...
...
test/Test/API/Private/Remote.hs
View file @
a08e14cc
...
@@ -45,7 +45,7 @@ withTwoServerInstances action =
...
@@ -45,7 +45,7 @@ withTwoServerInstances action =
where
where
server1Port
=
8008
server1Port
=
8008
server2Port
=
9008
server2Port
=
9008
log_cfg
te
=
(
test_config
te
)
^.
gc_logging
log_cfg
te
=
test_config
te
^.
gc_logging
tests
::
Spec
tests
::
Spec
tests
=
sequential
$
aroundAll
withTwoServerInstances
$
do
tests
=
sequential
$
aroundAll
withTwoServerInstances
$
do
...
...
test/Test/API/Setup.hs
View file @
a08e14cc
...
@@ -161,7 +161,7 @@ withBackendServerAndProxy action =
...
@@ -161,7 +161,7 @@ withBackendServerAndProxy action =
where
where
proxyPort
=
8090
proxyPort
=
8090
cfg
te
=
test_config
te
cfg
te
=
test_config
te
log_cfg
te
=
(
cfg
te
)
^.
gc_logging
log_cfg
te
=
cfg
te
^.
gc_logging
setupEnvironment
::
TestEnv
->
IO
()
setupEnvironment
::
TestEnv
->
IO
()
setupEnvironment
env
=
flip
runReaderT
env
$
runTestMonad
$
do
setupEnvironment
env
=
flip
runReaderT
env
$
runTestMonad
$
do
...
...
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