Try to fix windows automation tests

pull/4819/head
Qstick 4 years ago
parent f7bebbaaeb
commit 665a5c89c2

@ -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

@ -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

@ -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 @@ namespace NzbDrone.Automation.Test
{ {
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();

Loading…
Cancel
Save