mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
bump selenium container (#6071)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<Import Project="../Build/Common.csproj" />
|
<Import Project="../Build/Common.csproj" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NoWarn>$(NoWarn),xUnit1031</NoWarn>
|
<NoWarn>$(NoWarn),xUnit1031</NoWarn>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.15" />
|
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.15" />
|
||||||
<PackageReference Include="Selenium.Support" Version="4.1.1" />
|
<PackageReference Include="Selenium.Support" Version="4.1.1" />
|
||||||
<PackageReference Include="Selenium.WebDriver" Version="4.1.1" />
|
<PackageReference Include="Selenium.WebDriver" Version="4.22.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="125.0.6422.14100" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="125.0.6422.14100" />
|
||||||
<PackageReference Include="xunit" Version="2.6.6" />
|
<PackageReference Include="xunit" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ using NBXplorer.Models;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
using OpenQA.Selenium.DevTools.V100.DOMSnapshot;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
using StoreData = BTCPayServer.Data.StoreData;
|
using StoreData = BTCPayServer.Data.StoreData;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OpenQA.Selenium;
|
using OpenQA.Selenium;
|
||||||
using OpenQA.Selenium.Chrome;
|
using OpenQA.Selenium.Chrome;
|
||||||
using OpenQA.Selenium.DevTools.V100.Network;
|
|
||||||
using OpenQA.Selenium.Support.UI;
|
using OpenQA.Selenium.Support.UI;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ services:
|
|||||||
- merchant_lnd
|
- merchant_lnd
|
||||||
|
|
||||||
selenium:
|
selenium:
|
||||||
image: selenium/standalone-chrome:101.0
|
image: selenium/standalone-chrome:125.0
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "tests:172.23.0.18"
|
- "tests:172.23.0.18"
|
||||||
expose:
|
expose:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ services:
|
|||||||
- merchant_lnd
|
- merchant_lnd
|
||||||
|
|
||||||
selenium:
|
selenium:
|
||||||
image: selenium/standalone-chrome:101.0
|
image: selenium/standalone-chrome:125.0
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "tests:172.23.0.18"
|
- "tests:172.23.0.18"
|
||||||
expose:
|
expose:
|
||||||
|
|||||||
@@ -258,12 +258,27 @@ namespace BTCPayServer.Plugins
|
|||||||
|
|
||||||
private static IEnumerable<IBTCPayServerPlugin> GetPluginInstancesFromAssembly(Assembly assembly)
|
private static IEnumerable<IBTCPayServerPlugin> GetPluginInstancesFromAssembly(Assembly assembly)
|
||||||
{
|
{
|
||||||
return assembly.GetTypes().Where(type =>
|
return GetTypesNotCrash(assembly).Where(type =>
|
||||||
typeof(IBTCPayServerPlugin).IsAssignableFrom(type) && type != typeof(PluginService.AvailablePlugin) &&
|
typeof(IBTCPayServerPlugin).IsAssignableFrom(type) && type != typeof(PluginService.AvailablePlugin) &&
|
||||||
!type.IsAbstract).
|
!type.IsAbstract).
|
||||||
Select(type => (IBTCPayServerPlugin)Activator.CreateInstance(type, Array.Empty<object>()));
|
Select(type => (IBTCPayServerPlugin)Activator.CreateInstance(type, Array.Empty<object>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<Type> GetTypesNotCrash(Assembly assembly)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Strange crash with selenium
|
||||||
|
if (assembly.FullName.Contains("Selenium", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return Array.Empty<Type>();
|
||||||
|
return assembly.GetTypes();
|
||||||
|
}
|
||||||
|
catch(ReflectionTypeLoadException ex)
|
||||||
|
{
|
||||||
|
return ex.Types.Where(t => t is not null).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static IBTCPayServerPlugin GetPluginInstanceFromAssembly(string pluginIdentifier, Assembly assembly)
|
private static IBTCPayServerPlugin GetPluginInstanceFromAssembly(string pluginIdentifier, Assembly assembly)
|
||||||
{
|
{
|
||||||
return GetPluginInstancesFromAssembly(assembly).FirstOrDefault(plugin => plugin.Identifier == pluginIdentifier);
|
return GetPluginInstancesFromAssembly(assembly).FirstOrDefault(plugin => plugin.Identifier == pluginIdentifier);
|
||||||
|
|||||||
Reference in New Issue
Block a user