
ru.yandex.qatools.embed.postgresql.PsqlProcess Maven / Gradle / Ivy
The newest version!
package ru.yandex.qatools.embed.postgresql;
import de.flapdoodle.embed.process.config.IRuntimeConfig;
import de.flapdoodle.embed.process.distribution.Distribution;
import de.flapdoodle.embed.process.extract.IExtractedFileSet;
import ru.yandex.qatools.embed.postgresql.config.PostgresConfig;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* psql process
* (helper to initialize the DB)
*/
public class PsqlProcess extends AbstractPGProcess {
public PsqlProcess(Distribution distribution, PostgresConfig config, IRuntimeConfig runtimeConfig, E executable) throws IOException {
super(distribution, config, runtimeConfig, executable);
}
@Override
protected List getCommandLine(Distribution distribution, PostgresConfig config, IExtractedFileSet exe)
throws IOException {
List ret = new ArrayList<>();
ret.add(exe.executable().getAbsolutePath());
ret.addAll(Arrays.asList(
"-h", config.net().host(),
"-p", String.valueOf(config.net().port())
));
ret.addAll(config.args());
return ret;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy