Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Mailbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Mailbox
Commits
e605da31
Verified
Commit
e605da31
authored
3 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Add Jackson to test HTTP client as well
parent
5e797efb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!29
Create base IntegrationTest; move Contact; add Jackson
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mailbox-core/build.gradle
+1
-0
1 addition, 0 deletions
mailbox-core/build.gradle
mailbox-core/src/test/java/org/briarproject/mailbox/core/server/IntegrationTest.kt
+5
-0
5 additions, 0 deletions
...a/org/briarproject/mailbox/core/server/IntegrationTest.kt
with
6 additions
and
0 deletions
mailbox-core/build.gradle
+
1
−
0
View file @
e605da31
...
...
@@ -35,6 +35,7 @@ dependencies {
testImplementation
"io.mockk:mockk:$mockk_version"
testImplementation
"ch.qos.logback:logback-classic:1.2.5"
testImplementation
"io.ktor:ktor-client-cio:$ktor_version"
testImplementation
"io.ktor:ktor-client-jackson:$ktor_version"
testImplementation
"com.google.dagger:hilt-core:$hilt_version"
kaptTest
"com.google.dagger:dagger-compiler:$hilt_version"
}
...
...
This diff is collapsed.
Click to expand it.
mailbox-core/src/test/java/org/briarproject/mailbox/core/server/IntegrationTest.kt
+
5
−
0
View file @
e605da31
...
...
@@ -2,6 +2,8 @@ package org.briarproject.mailbox.core.server
import
io.ktor.client.HttpClient
import
io.ktor.client.engine.cio.CIO
import
io.ktor.client.features.json.JacksonSerializer
import
io.ktor.client.features.json.JsonFeature
import
org.briarproject.mailbox.core.DaggerTestComponent
import
org.briarproject.mailbox.core.TestComponent
import
org.briarproject.mailbox.core.TestModule
...
...
@@ -20,6 +22,9 @@ abstract class IntegrationTest {
private
val
lifecycleManager
by
lazy
{
testComponent
.
getLifecycleManager
()
}
protected
val
httpClient
=
HttpClient
(
CIO
)
{
expectSuccess
=
false
// prevents exceptions on non-success responses
install
(
JsonFeature
)
{
serializer
=
JacksonSerializer
()
}
}
protected
val
baseUrl
=
"http://127.0.0.1:$PORT"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment