package com.atlassian.bitbucket.test;

public class DatabaseTestHelper {

    public static String getTestDatabaseHost() {
        return System.getProperty("test.jdbc.host");
    }

    public static String getTestDatabasePort() {
        // Cargo 1.4.0+ stupidly checks all system properties passed to it and if any property
        // which ends in '.port' exists it checks whether the port is in use and throws an exception
        // if it is. Caused by https://jira.codehaus.org/browse/CARGO-365
        return System.getProperty("test.jdbc.portnumber");
    }

    public static String getTestDatabaseName() {
        return System.getProperty("test.jdbc.database");
    }

    public static String getTestDatabaseUser() {
        return System.getProperty("test.jdbc.user");
    }

    public static String getTestDatabasePassword() {
        return System.getProperty("test.jdbc.password");
    }

}
