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
f4dd5171
Commit
f4dd5171
authored
3 years ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Add some logging during test
parent
44531e43
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#7363
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mailbox-android/src/androidTest/java/org/briarproject/mailbox/core/DatabaseCreationTest.kt
+7
-1
7 additions, 1 deletion
...ava/org/briarproject/mailbox/core/DatabaseCreationTest.kt
with
7 additions
and
1 deletion
mailbox-android/src/androidTest/java/org/briarproject/mailbox/core/DatabaseCreationTest.kt
+
7
−
1
View file @
f4dd5171
package
org.briarproject.mailbox.core
import
android.util.Log
import
kotlinx.coroutines.runBlocking
import
org.junit.Test
import
org.sqlite.mc.SQLiteMCConfig
...
...
@@ -12,12 +13,16 @@ import kotlin.test.assertTrue
class
DatabaseCreationTest
{
companion
object
{
val
LOG_TAG
=
"db test"
}
@Test
fun
createDatabase
():
Unit
=
runBlocking
{
Class
.
forName
(
"org.sqlite.JDBC"
)
val
file
:
Path
=
Files
.
createTempFile
(
"test"
,
".sqlite"
)
println
(
file
)
Log
.
i
(
LOG_TAG
,
"file: $file"
)
val
connection
:
Connection
=
DriverManager
.
getConnection
(
"jdbc:sqlite:$file"
,
SQLiteMCConfig
().
withKey
(
"very-secret"
).
toProperties
()
...
...
@@ -36,6 +41,7 @@ class DatabaseCreationTest {
val
id
=
results
.
getInt
(
1
)
val
name
=
results
.
getString
(
2
)
Log
.
i
(
LOG_TAG
,
"row: $id $name"
)
when
(
i
)
{
0
->
{
assertEquals
(
1
,
id
)
...
...
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