Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Text File Validation
Commits
02f75b73
Commit
02f75b73
authored
Apr 07, 2020
by
Jonas Waeber
Browse files
Update test case
Now actually runs the program. Still no assert though.
parent
e78a4144
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/test/kotlin/KafkaEmbedded.kt
View file @
02f75b73
...
...
@@ -57,7 +57,7 @@ class KafkaEmbedded(port: Int, topic: String) : Closeable {
val
zkUtils
=
ZkUtils
.
apply
(
zkClient
,
false
)
AdminUtils
.
createTopic
(
zkUtils
,
topic
,
1
,
1
,
Properties
(),
RackAwareMode
.
`Disabled
$`
.
`MODULE
$`
)
TestUtils
.
waitUntilMetadataIsPropagated
(
scala
.
collection
.
JavaConversions
.
asScalaBuffer
(
listOf
(
server
)),
topic
,
0
,
5000
)
TestUtils
.
waitUntilMetadataIsPropagated
(
JavaConversions
.
asScalaBuffer
(
listOf
(
server
)),
topic
,
0
,
5000
)
}
override
fun
close
()
{
...
...
src/test/kotlin/Tests.kt
View file @
02f75b73
/*
* sftp-reader
r
* sftp-reader
* Copyright (C) 2019 Memobase
*
* This program is free software: you can redistribute it and/or modify
...
...
@@ -19,14 +19,18 @@ package org.memobase
import
org.junit.jupiter.api.Assertions.assertEquals
import
org.junit.jupiter.api.Test
import
org.junit.jupiter.api.TestInstance
import
org.junit.jupiter.api.assertAll
@TestInstance
(
TestInstance
.
Lifecycle
.
PER_CLASS
)
class
Tests
{
private
val
kafkaEmbedded
=
KafkaEmbedded
(
12301
,
"test"
)
@Test
fun
testCase1
()
{
K
afkaEmbedded
(
12301
,
"test"
)
.
use
{
k
afkaEmbedded
.
use
{
App
.
main
(
emptyArray
())
assertAll
(
"test case 1"
,
{
assertEquals
(
"null"
,
"null"
)
},
{
assertEquals
(
"null"
,
"null"
)
}
...
...
src/test/resources/app.yml
0 → 100644
View file @
02f75b73
sftp
:
host
:
sb-uingest1.swissbib.ch
port
:
"
22"
user
:
mb_sftp
password
:
${SFTP_PASSWORD:?env}
fingerprint
:
${HOST_KEY_VERIFIER:?env}
app
:
directory
:
./test_institution_1/test_record_set_1/
kafka
:
producer
:
bootstrap.servers
:
localhost:9092
client.id
:
${CLIENT_ID:?env}
topic
:
out
:
${CLIENT_ID:?env}
\ No newline at end of file
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