Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PaketTestsSourcesDir>..\Paket.IntegrationTests</PaketTestsSourcesDir>
<DefineConstants>PAKET_NETCORE</DefineConstants>
<DefineConstants>
PAKET_NETCORE;
NO_UNIT_PLATFORMATTRIBUTE;
TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005;
FAKE_NETSTANDARD_API;
@(DefineConstants)
</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let ``#1182 framework restrictions overwrite each other``() =
lockFile.Contains("framework: winv4.5") |> shouldEqual false

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform("Mono")>] // PATH TOO LONG on Windows...
Expand Down
8 changes: 4 additions & 4 deletions integrationtests/Paket.IntegrationTests/FullGitSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let ``#1353 should use NuGet source from git repo``() =
|> shouldEqual (SemVer.Parse "1.1.3")

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005
[<Ignore("Known failure on netcore: ref https://github.com/fsprojects/Paket/issues/3005")>]
#endif
let ``#1353 should use git tag as NuGet source``() =
Expand All @@ -61,7 +61,7 @@ let ``#1353 should use git tag as NuGet source``() =
|> shouldEqual (SemVer.Parse "2.0.0")

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005
[<Ignore("Known failure on netcore: ref https://github.com/fsprojects/Paket/issues/3005")>]
#endif
let ``#1353 should use git tag with operatore as NuGet source``() =
Expand All @@ -75,7 +75,7 @@ let ``#1353 should use git tag with operatore as NuGet source``() =
|> shouldEqual (SemVer.Parse "2.0.0")

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005
[<Ignore("Known failure on netcore: ref https://github.com/fsprojects/Paket/issues/3005")>]
#endif
let ``#1353 should restore NuGet source from built git repo``() =
Expand All @@ -88,7 +88,7 @@ let ``#1353 should restore NuGet source from built git repo``() =
Directory.Exists arguPackagesDir |> shouldEqual true

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005
[<Ignore("Known failure on netcore: ref https://github.com/fsprojects/Paket/issues/3005")>]
#endif
let ``#1353 should build NuGet source from git repo``() =
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let ``#183 outdated without params``() =
msg |> shouldContainText "FSharp.Formatting 2.4 ->"

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Mono">] // PATH TOO LONG on Windows...
Expand All @@ -26,7 +26,7 @@ let ``#183 outdated --ignore-constraint``() =


[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Mono">] // PATH TOO LONG on Windows...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let ``#2922-1 paket can timeout out of loop of doom``() =
| exn when exn.Message.Contains("TimeoutException") -> ()

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform("Net")>]
Expand Down
2 changes: 1 addition & 1 deletion integrationtests/Paket.IntegrationTests/RestoreSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let ``#2496 Paket fails on projects that target multiple frameworks``() =
|> ignore

[<Test>]
#if NETCOREAPP2_0
#if FAKE_NETSTANDARD_API
[<Ignore("use an api of FakeLib (net40) unsupported on .net core")>]
#endif
let ``#2812 Lowercase package names in package cache: old csproj, packages folder enabled``() =
Expand Down
8 changes: 7 additions & 1 deletion tests/Paket.Tests.preview3/Paket.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PaketTestsSourcesDir>..\Paket.Tests</PaketTestsSourcesDir>
<DefineConstants>WEBPROXY_NETSTANDARD;$(DefineConstants)</DefineConstants>
<DefineConstants>
WEBPROXY_NETSTANDARD;
TESTSUITE_RUNS_ON_DOTNETCORE;
NO_UNIT_PLATFORMATTRIBUTE;
NO_UNIT_TIMEOUTATTRIBUTE;
@(DefineConstants)
</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let expected = """
</Choose>"""

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
[<Flaky>]
#endif
let ``should generate Xml for FSharp.Data.SqlClient 1.4.4``() =
Expand Down
2 changes: 1 addition & 1 deletion tests/Paket.Tests/InstallModel/Xml/GitInfoPlanter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let expectedPropertyNodes = """<?xml version="1.0" encoding="utf-16"?>
<Import Project="..\..\..\GitInfoPlanter\build\GitInfoPlanter.targets" Condition="Exists('..\..\..\GitInfoPlanter\build\GitInfoPlanter.targets')" Label="Paket" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />"""

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
[<Flaky>]
#endif
let ``should generate Xml for GitInfoPlanter2.0.0``() =
Expand Down
2 changes: 1 addition & 1 deletion tests/Paket.Tests/InstallModel/Xml/StyleCop.MSBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let expectedPropertyNodes = """<?xml version="1.0" encoding="utf-16"?>
<Import Project="..\..\..\StyleCop.MSBuild\build\StyleCop.MSBuild.Targets" Condition="Exists('..\..\..\StyleCop.MSBuild\build\StyleCop.MSBuild.Targets')" Label="Paket" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />"""

[<Test>]
#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
[<Flaky>]
#endif
let ``should generate Xml for StyleCop.MSBuild``() =
Expand Down
4 changes: 2 additions & 2 deletions tests/Paket.Tests/NuGetConfig/NuGetConfigSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ open Chessie.ErrorHandling
open System.Xml
open TestHelpers

#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
open System.Runtime.InteropServices
#endif

Expand All @@ -26,7 +26,7 @@ let parse fileName =
[<Test>]
let ``can detect encrypted passwords in nuget.config``() =

#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
if not(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) then
//TODO not create a secrect, just check the parse fails with an error
Assert.Ignore("ProtectedData.Protect is supported only on windows")
Expand Down
6 changes: 3 additions & 3 deletions tests/Paket.Tests/Resolver/ResolverErrorSituationTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let graph1 =
]

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_TIMEOUTATTRIBUTE
[<Ignore "TimeoutAttribute not supported by netstandard NUnit">]
#else
[<Timeout 5000>]
Expand Down Expand Up @@ -263,7 +263,7 @@ let ``task priorization works``() =
cts.Cancel()

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_TIMEOUTATTRIBUTE
[<Ignore "TimeoutAttribute not supported by netstandard NUnit">]
#else
[<Timeout 5000>]
Expand Down Expand Up @@ -322,7 +322,7 @@ let ``cancellation fsharp.core``() =
with :? AggregateException as agg -> ()

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_TIMEOUTATTRIBUTE
[<Ignore "TimeoutAttribute not supported by netstandard NUnit">]
#else
[<Timeout 5000>]
Expand Down
4 changes: 2 additions & 2 deletions tests/Paket.Tests/UtilsSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let ``relative path with local identifier on unxoid systems``() =
|> shouldEqual (RelativePath "./Store")

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Mono">]
Expand All @@ -78,7 +78,7 @@ let ``mono runtime reported on mono platform``() =
shouldEqual true

[<Test>]
#if NETCOREAPP2_0
#if NO_UNIT_PLATFORMATTRIBUTE
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Net">]
Expand Down
6 changes: 3 additions & 3 deletions tests/Paket.Tests/Versioning/ConfigFileSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open NUnit.Framework
open System.Xml
open FsUnit

#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
open System.Runtime.InteropServices
#endif

Expand All @@ -23,7 +23,7 @@ let sampleDoc() =
[<Test>]
let ``get username, password, and auth type from node``() =

#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
if not(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) then
Assert.Ignore("Encrypt use ProtectedData.Protect that is supported only on windows")
#endif
Expand All @@ -45,7 +45,7 @@ let ``get username, password, and auth type from node``() =
[<Test>]
let ``get username and password from node without auth type``() =

#if NETCOREAPP2_0
#if TESTSUITE_RUNS_ON_DOTNETCORE
if not(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) then
Assert.Ignore("Encrypt use ProtectedData.Protect that is supported only on windows")
#endif
Expand Down