mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-05 23:24:27 +01:00
Update and fix docker-compose test
This commit is contained in:
@@ -103,11 +103,13 @@ namespace BTCPayServer.Tests
|
|||||||
{
|
{
|
||||||
var compose1 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.yml"));
|
var compose1 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.yml"));
|
||||||
var compose2 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.altcoins.yml"));
|
var compose2 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.altcoins.yml"));
|
||||||
|
var compose3 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.mutinynet.yml"));
|
||||||
|
var compose4 = File.ReadAllText(Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer.Tests", "docker-compose.testnet.yml"));
|
||||||
|
|
||||||
List<DockerImage> GetImages(string content)
|
List<DockerImage> GetImages(string content)
|
||||||
{
|
{
|
||||||
List<DockerImage> images = new List<DockerImage>();
|
var images = new List<DockerImage>();
|
||||||
foreach (var line in content.Split(new[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
|
foreach (var line in content.Split(["\n", "\r\n"], StringSplitOptions.RemoveEmptyEntries))
|
||||||
{
|
{
|
||||||
var l = line.Trim();
|
var l = line.Trim();
|
||||||
if (l.StartsWith("image:", StringComparison.OrdinalIgnoreCase))
|
if (l.StartsWith("image:", StringComparison.OrdinalIgnoreCase))
|
||||||
@@ -120,13 +122,15 @@ namespace BTCPayServer.Tests
|
|||||||
|
|
||||||
var img1 = GetImages(compose1);
|
var img1 = GetImages(compose1);
|
||||||
var img2 = GetImages(compose2);
|
var img2 = GetImages(compose2);
|
||||||
var groups = img1.Concat(img2).GroupBy(g => g.Name);
|
var img3 = GetImages(compose3);
|
||||||
|
var img4 = GetImages(compose4);
|
||||||
|
var groups = img1.Concat(img2).Concat(img3).Concat(img4).GroupBy(g => g.Name);
|
||||||
foreach (var g in groups)
|
foreach (var g in groups)
|
||||||
{
|
{
|
||||||
var tags = new HashSet<String>(g.Select(o => o.Tag));
|
var tags = new HashSet<string>(g.Select(o => o.Tag));
|
||||||
if (tags.Count != 1)
|
if (tags.Count != 1)
|
||||||
{
|
{
|
||||||
Assert.Fail($"All docker images '{g.Key}' in docker-compose.yml and docker-compose.altcoins.yml should have the same tags. (Found {string.Join(',', tags)})");
|
Assert.Fail($"All docker images '{g.Key}' across the docker-compose.yml files should have the same tags. (Found {string.Join(',', tags)})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ services:
|
|||||||
custom:
|
custom:
|
||||||
|
|
||||||
nbxplorer:
|
nbxplorer:
|
||||||
image: nicolasdorier/nbxplorer:2.5.4
|
image: nicolasdorier/nbxplorer:2.5.12
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "32838:32838"
|
- "32838:32838"
|
||||||
@@ -120,7 +120,7 @@ services:
|
|||||||
- "bitcoin_datadir:/data"
|
- "bitcoin_datadir:/data"
|
||||||
|
|
||||||
customer_lightningd:
|
customer_lightningd:
|
||||||
image: btcpayserver/lightning:v24.05
|
image: btcpayserver/lightning:v24.08.2
|
||||||
stop_signal: SIGKILL
|
stop_signal: SIGKILL
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -149,7 +149,7 @@ services:
|
|||||||
- bitcoind
|
- bitcoind
|
||||||
|
|
||||||
merchant_lightningd:
|
merchant_lightningd:
|
||||||
image: btcpayserver/lightning:v24.05
|
image: btcpayserver/lightning:v24.08.2
|
||||||
stop_signal: SIGKILL
|
stop_signal: SIGKILL
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -187,7 +187,7 @@ services:
|
|||||||
- "5432"
|
- "5432"
|
||||||
|
|
||||||
merchant_lnd:
|
merchant_lnd:
|
||||||
image: btcpayserver/lnd:v0.18.1-beta
|
image: btcpayserver/lnd:v0.18.3-beta
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
LND_CHAIN: "btc"
|
LND_CHAIN: "btc"
|
||||||
@@ -225,7 +225,7 @@ services:
|
|||||||
- bitcoind
|
- bitcoind
|
||||||
|
|
||||||
customer_lnd:
|
customer_lnd:
|
||||||
image: btcpayserver/lnd:v0.18.1-beta
|
image: btcpayserver/lnd:v0.18.3-beta
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
LND_CHAIN: "btc"
|
LND_CHAIN: "btc"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ services:
|
|||||||
custom:
|
custom:
|
||||||
|
|
||||||
nbxplorer:
|
nbxplorer:
|
||||||
image: nicolasdorier/nbxplorer:2.5.4
|
image: nicolasdorier/nbxplorer:2.5.12
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "32838:32838"
|
- "32838:32838"
|
||||||
@@ -110,7 +110,7 @@ services:
|
|||||||
- "bitcoin_datadir:/data"
|
- "bitcoin_datadir:/data"
|
||||||
|
|
||||||
customer_lightningd:
|
customer_lightningd:
|
||||||
image: btcpayserver/lightning:v24.05
|
image: btcpayserver/lightning:v24.08.2
|
||||||
stop_signal: SIGKILL
|
stop_signal: SIGKILL
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -139,7 +139,7 @@ services:
|
|||||||
- bitcoind
|
- bitcoind
|
||||||
|
|
||||||
merchant_lightningd:
|
merchant_lightningd:
|
||||||
image: btcpayserver/lightning:v24.05
|
image: btcpayserver/lightning:v24.08.2
|
||||||
stop_signal: SIGKILL
|
stop_signal: SIGKILL
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -177,7 +177,7 @@ services:
|
|||||||
- "5432"
|
- "5432"
|
||||||
|
|
||||||
merchant_lnd:
|
merchant_lnd:
|
||||||
image: btcpayserver/lnd:v0.18.1-beta
|
image: btcpayserver/lnd:v0.18.3-beta
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
LND_CHAIN: "btc"
|
LND_CHAIN: "btc"
|
||||||
@@ -215,7 +215,7 @@ services:
|
|||||||
- bitcoind
|
- bitcoind
|
||||||
|
|
||||||
customer_lnd:
|
customer_lnd:
|
||||||
image: btcpayserver/lnd:v0.18.1-beta
|
image: btcpayserver/lnd:v0.18.3-beta
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
LND_CHAIN: "btc"
|
LND_CHAIN: "btc"
|
||||||
|
|||||||
Reference in New Issue
Block a user