New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sipi): Don't expect API v1 status code (DSP-1114) #1763
Merged
Merged
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
be75de1
fix(sipi): Don't expect API v1 status code.
c1146df
fix(sipi): Add some debugging.
b311ee1
style(sipi): Remove newline.
47baf52
Merge branch 'main' into fix/DSP-1114-sipi
bd5401a
fix: move sipi init scripts to the scripts folder
subotic 8af166a
test(sipi): Try to fix test.
ae3d3d2
Merge branch 'main' into fix/DSP-1114-sipi
d9fe7cd
fix: sipi testcontainer config
subotic 8c3e43e
Merge branch 'fix/DSP-1114-sipi' of github.com:dasch-swiss/knora-api …
subotic bad6587
test(sipi): Uncomment test.
f345669
fix: testcontainer deprecation
subotic 9fbecd0
Merge branch 'main' into fix/DSP-1114-sipi
2aab29c
fix(test): Don't pass loopback interface to Sipi.
0c285ae
test: Fix build errors.
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
package org.knora.webapi | ||
|
||
import java.net.InetAddress | ||
import com.typesafe.config.{Config, ConfigFactory} | ||
import org.testcontainers.containers.{BindMode, GenericContainer} | ||
|
||
|
@@ -27,6 +28,10 @@ import org.testcontainers.containers.{BindMode, GenericContainer} | |
*/ | ||
object TestContainers { | ||
|
||
// get local IP address, which we need for SIPI | ||
val localhost: InetAddress = InetAddress.getLocalHost | ||
val localIpAddress: String = localhost.getHostAddress | ||
|
||
val FusekiContainer = new GenericContainer("bazel/docker/knora-jena-fuseki:image") | ||
FusekiContainer.withExposedPorts(3030) | ||
FusekiContainer.withEnv("ADMIN_PASSWORD", "test") | ||
|
@@ -35,14 +40,12 @@ object TestContainers { | |
|
||
val SipiContainer = new GenericContainer("bazel/docker/knora-sipi:image") | ||
SipiContainer.withExposedPorts(1024) | ||
SipiContainer.withEnv("SIPI_WEBAPI_HOSTNAME", "api") | ||
SipiContainer.withEnv("SIPI_WEBAPI_HOSTNAME", localIpAddress) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here your machine's IP should be used to configure Sipi. |
||
SipiContainer.withEnv("SIPI_WEBAPI_PORT", "3333") | ||
SipiContainer.withCommand("--config=/sipi/config/sipi.knora-docker-config.lua") | ||
SipiContainer.withClasspathResourceMapping("/sipi/config/sipi.knora-docker-config.lua", | ||
SipiContainer.withClasspathResourceMapping( | ||
"/sipi/config/sipi.knora-docker-config.lua", | ||
"/sipi/config/sipi.knora-docker-config.lua", | ||
BindMode.READ_ONLY) | ||
SipiContainer.withClasspathResourceMapping("/sipi/config/sipi.knora-docker-config.lua", | ||
"/sipi/config/sipi.init-knora.lua", | ||
BindMode.READ_ONLY) | ||
SipiContainer.start() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be your machine's IP. Could you maybe run it in debug mode and see what you get here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a static initialiser bug: if so, these
val
s need to belazy
because otherwise they might not be initialised before they're needed. Will confirm after lunch.