From aa336e7d8aeeeebfcb9727ea2109eccdafee3d65 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Wed, 4 Dec 2024 12:10:45 +0100 Subject: [PATCH] Update and fix docker-compose test --- BTCPayServer.Tests/FastTests.cs | 14 +++++++++----- BTCPayServer.Tests/docker-compose.mutinynet.yml | 10 +++++----- BTCPayServer.Tests/docker-compose.testnet.yml | 10 +++++----- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/BTCPayServer.Tests/FastTests.cs b/BTCPayServer.Tests/FastTests.cs index 36505cf63..3fb383034 100644 --- a/BTCPayServer.Tests/FastTests.cs +++ b/BTCPayServer.Tests/FastTests.cs @@ -103,11 +103,13 @@ namespace BTCPayServer.Tests { 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 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 GetImages(string content) { - List images = new List(); - foreach (var line in content.Split(new[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries)) + var images = new List(); + foreach (var line in content.Split(["\n", "\r\n"], StringSplitOptions.RemoveEmptyEntries)) { var l = line.Trim(); if (l.StartsWith("image:", StringComparison.OrdinalIgnoreCase)) @@ -120,13 +122,15 @@ namespace BTCPayServer.Tests var img1 = GetImages(compose1); 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) { - var tags = new HashSet(g.Select(o => o.Tag)); + var tags = new HashSet(g.Select(o => o.Tag)); 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)})"); } } } diff --git a/BTCPayServer.Tests/docker-compose.mutinynet.yml b/BTCPayServer.Tests/docker-compose.mutinynet.yml index 1fe03f740..c970e37df 100644 --- a/BTCPayServer.Tests/docker-compose.mutinynet.yml +++ b/BTCPayServer.Tests/docker-compose.mutinynet.yml @@ -62,7 +62,7 @@ services: custom: nbxplorer: - image: nicolasdorier/nbxplorer:2.5.4 + image: nicolasdorier/nbxplorer:2.5.12 restart: unless-stopped ports: - "32838:32838" @@ -120,7 +120,7 @@ services: - "bitcoin_datadir:/data" customer_lightningd: - image: btcpayserver/lightning:v24.05 + image: btcpayserver/lightning:v24.08.2 stop_signal: SIGKILL restart: unless-stopped environment: @@ -149,7 +149,7 @@ services: - bitcoind merchant_lightningd: - image: btcpayserver/lightning:v24.05 + image: btcpayserver/lightning:v24.08.2 stop_signal: SIGKILL restart: unless-stopped environment: @@ -187,7 +187,7 @@ services: - "5432" merchant_lnd: - image: btcpayserver/lnd:v0.18.1-beta + image: btcpayserver/lnd:v0.18.3-beta restart: unless-stopped environment: LND_CHAIN: "btc" @@ -225,7 +225,7 @@ services: - bitcoind customer_lnd: - image: btcpayserver/lnd:v0.18.1-beta + image: btcpayserver/lnd:v0.18.3-beta restart: unless-stopped environment: LND_CHAIN: "btc" diff --git a/BTCPayServer.Tests/docker-compose.testnet.yml b/BTCPayServer.Tests/docker-compose.testnet.yml index 4011e7f87..b301ba2de 100644 --- a/BTCPayServer.Tests/docker-compose.testnet.yml +++ b/BTCPayServer.Tests/docker-compose.testnet.yml @@ -57,7 +57,7 @@ services: custom: nbxplorer: - image: nicolasdorier/nbxplorer:2.5.4 + image: nicolasdorier/nbxplorer:2.5.12 restart: unless-stopped ports: - "32838:32838" @@ -110,7 +110,7 @@ services: - "bitcoin_datadir:/data" customer_lightningd: - image: btcpayserver/lightning:v24.05 + image: btcpayserver/lightning:v24.08.2 stop_signal: SIGKILL restart: unless-stopped environment: @@ -139,7 +139,7 @@ services: - bitcoind merchant_lightningd: - image: btcpayserver/lightning:v24.05 + image: btcpayserver/lightning:v24.08.2 stop_signal: SIGKILL restart: unless-stopped environment: @@ -177,7 +177,7 @@ services: - "5432" merchant_lnd: - image: btcpayserver/lnd:v0.18.1-beta + image: btcpayserver/lnd:v0.18.3-beta restart: unless-stopped environment: LND_CHAIN: "btc" @@ -215,7 +215,7 @@ services: - bitcoind customer_lnd: - image: btcpayserver/lnd:v0.18.1-beta + image: btcpayserver/lnd:v0.18.3-beta restart: unless-stopped environment: LND_CHAIN: "btc"