Tests should use explorer.postgres

This commit is contained in:
nicolas.dorier 2022-07-05 14:39:50 +09:00
parent 52f5d21480
commit 2ba24ba56b
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
4 changed files with 10 additions and 0 deletions

View File

@ -75,6 +75,10 @@ namespace BTCPayServer.Tests
{
get; set;
}
public string ExplorerPostgres
{
get; set;
}
IWebHost _Host;
public int Port
@ -154,6 +158,9 @@ namespace BTCPayServer.Tests
config.AppendLine($"mysql=" + MySQL);
else if (!String.IsNullOrEmpty(Postgres))
config.AppendLine($"postgres=" + Postgres);
if (!string.IsNullOrEmpty(ExplorerPostgres))
config.AppendLine($"explorer.postgres=" + ExplorerPostgres);
var confPath = Path.Combine(chainDirectory, "settings.config");
await File.WriteAllTextAsync(confPath, config.ToString());

View File

@ -50,6 +50,7 @@ namespace BTCPayServer.Tests
// since in dev we already can have some users / stores registered, while on CI database is being initalized
// for the first time and first registered user gets admin status by default
Postgres = GetEnvironment("TESTS_POSTGRES", "User ID=postgres;Include Error Detail=true;Host=127.0.0.1;Port=39372;Database=btcpayserver"),
ExplorerPostgres = GetEnvironment("TESTS_EXPLORER_POSTGRES", "User ID=postgres;Include Error Detail=true;Host=127.0.0.1;Port=39372;Database=nbxplorer"),
MySQL = GetEnvironment("TESTS_MYSQL", "User ID=root;Host=127.0.0.1;Port=33036;Database=btcpayserver")
};
if (newDb)

View File

@ -18,6 +18,7 @@ services:
TESTS_LTCNBXPLORERURL: http://nbxplorer:32838/
TESTS_DB: "Postgres"
TESTS_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=btcpayserver
TESTS_EXPLORER_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=nbxplorer
TESTS_HOSTNAME: tests
TESTS_RUN_EXTERNAL_INTEGRATION: ${TESTS_RUN_EXTERNAL_INTEGRATION:-"false"}
TESTS_AzureBlobStorageConnectionString: ${TESTS_AzureBlobStorageConnectionString:-none}

View File

@ -16,6 +16,7 @@ services:
TESTS_BTCNBXPLORERURL: http://nbxplorer:32838/
TESTS_DB: "Postgres"
TESTS_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=btcpayserver
TESTS_EXPLORER_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=nbxplorer
TESTS_HOSTNAME: tests
TESTS_RUN_EXTERNAL_INTEGRATION: ${TESTS_RUN_EXTERNAL_INTEGRATION:-"false"}
TESTS_AzureBlobStorageConnectionString: ${TESTS_AzureBlobStorageConnectionString:-none}