Skip to content

Whitespaces are not trimmed for the values in the testcontainers.properties  #3053

Closed
@danblack

Description

@danblack

If there is a whitespace at the end of the last line of the testcontainers.properties, a test will fail with an error's text shown below
Library version: 1.14.3

testcontainers.properties

tinyimage.container.image = nexus.isb/alpine:3.5
ryuk.container.image = nexus.isb/distantcash-docker-hosted/testcontainersofficial/ryuk:0.3.0 

error

org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=xxx/clickhouse-server:latest, imagePullPolicy=DefaultPullPolicy())
           at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1279)
           at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:613)
           at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:320)
           ... 71 more

           Caused by:
           com.github.dockerjava.api.exception.BadRequestException: {"message":"invalid reference format"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions