Skip to content

PostgreSQLContainer does not honor withCommand #937

@kellen

Description

@kellen

The postgres container does not honor withCommand because it is overridden in configure():

    protected void configure() {

        addExposedPort(POSTGRESQL_PORT);
        addEnv("POSTGRES_DB", databaseName);
        addEnv("POSTGRES_USER", username);
        addEnv("POSTGRES_PASSWORD", password);
        setCommand("postgres");
    }

This seems like it would also be a problem for several other containers using setCommand in configure, including NginxContainer, BrowserWebDriverContainer, and VncRecordingContainer.

In the case of PostgreSQLContainer, the command can just be removed, but in these other cases I'm not sure what the best behavior would be; possibly moving the default setCommand to the constructor or calling it whenever the container's internal configuration changes (e.g. when setting the vncPassword).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions