Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
testcontainers-ci
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Janne Mareike Koschinski
testcontainers-ci
Commits
0b4842e3
Verified
Commit
0b4842e3
authored
4 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Initial Commit
parents
No related branches found
No related tags found
No related merge requests found
Pipeline
#618
canceled
4 years ago
Stage: build
Stage: test
Stage: release
Changes
21
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/kotlin/de/justjanne/testcontainersci/implementation/TestContainersProvidedContainer.kt
+28
-0
28 additions, 0 deletions
...inersci/implementation/TestContainersProvidedContainer.kt
with
28 additions
and
0 deletions
src/main/kotlin/de/justjanne/testcontainersci/implementation/TestContainersProvidedContainer.kt
0 → 100644
+
28
−
0
View file @
0b4842e3
/*
* Testcontainers-CI
* Copyright (c) 2021 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package
de.justjanne.testcontainersci.implementation
import
de.justjanne.testcontainersci.api.ProvidedContainer
import
org.testcontainers.containers.GenericContainer
import
java.net.InetAddress
/**
* Wrapper wrapping a local container
*/
class
TestContainersProvidedContainer
<
T
:
GenericContainer
<
T
>>(
private
val
container
:
T
)
:
ProvidedContainer
{
override
fun
start
()
=
container
.
start
()
override
fun
stop
()
=
container
.
stop
()
override
val
address
:
InetAddress
get
()
=
InetAddress
.
getByName
(
container
.
containerIpAddress
)
override
fun
getMappedPort
(
originalPort
:
Int
):
Int
=
container
.
getMappedPort
(
originalPort
)
}
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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