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
159
Issues
159
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
832f70e3
Verified
Commit
832f70e3
authored
Nov 06, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests] some more tests refactoring
parent
b4bd2596
Pipeline
#6945
passed with stages
in 53 minutes and 36 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
Authentication.hs
test/Test/API/Authentication.hs
+1
-1
Errors.hs
test/Test/API/Errors.hs
+1
-1
GraphQL.hs
test/Test/API/GraphQL.hs
+1
-1
Share.hs
test/Test/API/Private/Share.hs
+1
-1
ReverseProxy.hs
test/Test/Server/ReverseProxy.hs
+1
-1
Utils.hs
test/Test/Utils.hs
+1
-1
No files found.
test/Test/API/Authentication.hs
View file @
832f70e3
...
...
@@ -35,7 +35,7 @@ cannedToken :: T.Text
cannedToken
=
"eyJhbGciOiJIUzUxMiJ9.eyJkYXQiOnsiaWQiOjF9fQ.t49zZSqkPAulEkYEh4pW17H2uwrkyPTdZKwHyG3KUJ0hzU2UUoPBNj8vdv087RCVBJ4tXgxNbP4j0RBv3gxdqg"
tests
::
Spec
tests
=
sequentia
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
(
\
ctx
->
setupEnvironment
(
_sctx_env
ctx
)
>>=
(
const
$
pure
ctx
))
$
do
tests
=
paralle
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
(
\
ctx
->
setupEnvironment
(
_sctx_env
ctx
)
>>=
(
const
$
pure
ctx
))
$
do
describe
"Authentication"
$
do
baseUrl
<-
runIO
$
parseBaseUrl
"http://localhost"
manager
<-
runIO
$
newManager
defaultManagerSettings
...
...
test/Test/API/Errors.hs
View file @
832f70e3
...
...
@@ -24,7 +24,7 @@ import Text.RawString.QQ (r)
tests
::
Spec
tests
=
sequentia
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
tests
=
paralle
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
describe
"Errors API"
$
do
describe
"Prelude"
$
do
it
"setup DB triggers and users"
$
\
ctx
->
do
...
...
test/Test/API/GraphQL.hs
View file @
832f70e3
...
...
@@ -18,7 +18,7 @@ import Test.Utils (protected, protectedNewError, shouldRespondWithFragment, shou
import
Text.RawString.QQ
(
r
)
tests
::
Spec
tests
=
sequentia
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
tests
=
paralle
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
describe
"GraphQL"
$
do
describe
"get_user_infos"
$
do
it
"allows 'alice' to see her own info"
$
\
(
SpecContext
testEnv
port
app
_
)
->
do
...
...
test/Test/API/Private/Share.hs
View file @
832f70e3
...
...
@@ -41,7 +41,7 @@ shareURL token =
&
shareUrlEp
tests
::
Spec
tests
=
sequentia
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
tests
=
paralle
l
$
aroundAll
withTestDBAndPort
$
beforeAllWith
dbEnvSetup
$
do
describe
"Prelude"
$
do
it
"should fail if no node type is specified"
$
\
(
SpecContext
_testEnv
serverPort
app
_
)
->
do
withApplication
app
$
do
...
...
test/Test/Server/ReverseProxy.hs
View file @
832f70e3
...
...
@@ -26,7 +26,7 @@ tests = describe "Microservices proxy" $ do
writeFrameTests
writeFrameTests
::
Spec
writeFrameTests
=
sequentia
l
$
aroundAll
withBackendServerAndProxy
$
beforeAllWith
(
\
ctx
@
(
testEnv
,
_
,
_
)
->
setupEnvironment
testEnv
>>=
(
const
$
pure
ctx
))
$
do
writeFrameTests
=
paralle
l
$
aroundAll
withBackendServerAndProxy
$
beforeAllWith
(
\
ctx
@
(
testEnv
,
_
,
_
)
->
setupEnvironment
testEnv
>>=
(
const
$
pure
ctx
))
$
do
describe
"Write Frame Reverse Proxy"
$
do
it
"should disallow unauthenticated requests"
$
\
(
_testEnv
,
_serverPort
,
proxyPort
)
->
do
baseUrl
<-
parseBaseUrl
"http://localhost"
...
...
test/Test/Utils.hs
View file @
832f70e3
...
...
@@ -248,7 +248,7 @@ pollUntilWorkFinished :: HasCallStack
->
JobInfo
->
WaiSession
()
JobInfo
pollUntilWorkFinished
tkn
port
ji
=
do
let
waitSecs
=
1
0
let
waitSecs
=
3
0
isFinishedTVar
<-
liftIO
$
newTVarIO
False
let
wsConnect
=
withWSConnection
(
"127.0.0.1"
,
port
)
$
\
conn
->
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