1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-05 15:47:20 +02:00

Try to fix windows automation tests

This commit is contained in:
Qstick 2020-08-17 23:33:22 -04:00
parent f7bebbaaeb
commit 665a5c89c2
3 changed files with 8 additions and 11 deletions

View File

@ -642,14 +642,14 @@ stages:
failBuild: true failBuild: true
Mac: Mac:
osName: 'Mac' osName: 'Mac'
imageName: 'macos-10.14' # Fails due to firefox not being installed on image imageName: 'macos-10.14'
pattern: 'Radarr.**.osx-core-x64.tar.gz' pattern: 'Radarr.**.osx-core-x64.tar.gz'
failBuild: false failBuild: true
Windows: Windows:
osName: 'Windows' osName: 'Windows'
imageName: 'windows-2019' imageName: 'windows-2019'
pattern: 'Radarr.**.windows-core-x64.zip' pattern: 'Radarr.**.windows-core-x64.zip'
failBuild: $(failOnAutomationFailure) failBuild: true
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
@ -684,9 +684,9 @@ stages:
displayName: Move Package Contents displayName: Move Package Contents
- bash: | - bash: |
if [[ $OSNAME == "Mac" ]]; then if [[ $OSNAME == "Mac" ]]; then
url=https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-macos.tar.gz url=https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-macos.tar.gz
elif [[ $OSNAME == "Linux" ]]; then elif [[ $OSNAME == "Linux" ]]; then
url=https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz url=https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-linux64.tar.gz
else else
echo "Unhandled OS" echo "Unhandled OS"
exit 1 exit 1

View File

@ -235,7 +235,7 @@ PackageTests()
# geckodriver.exe isn't copied by dotnet publish # geckodriver.exe isn't copied by dotnet publish
if [ "$runtime" = "win-x64" ]; if [ "$runtime" = "win-x64" ];
then then
curl -Lso gecko.zip "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-win64.zip" curl -Lso gecko.zip "https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-win64.zip"
unzip -o gecko.zip unzip -o gecko.zip
cp geckodriver.exe "$testPackageFolder/$framework/win-x64/publish" cp geckodriver.exe "$testPackageFolder/$framework/win-x64/publish"
fi fi

View File

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FluentAssertions; using FluentAssertions;
using NLog; using NLog;
@ -36,10 +36,7 @@ public void SmokeTestSetup()
{ {
var options = new FirefoxOptions(); var options = new FirefoxOptions();
options.AddArguments("--headless"); options.AddArguments("--headless");
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService(); driver = new FirefoxDriver(options);
// service.Host = "::1"; // Workaround netcore/selenium bug https://github.com/SeleniumHQ/selenium/issues/7840
driver = new FirefoxDriver(service, options, new System.TimeSpan(0, 3, 0));
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger()); _runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger());
_runner.KillAll(); _runner.KillAll();