Skip to content

Commit

Permalink
Remove obsolete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 23, 2020
1 parent df9fc49 commit 7703993
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 50 deletions.
38 changes: 9 additions & 29 deletions integrationtests/Paket.IntegrationTests/BindingRedirect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ open System.Text.RegularExpressions
open Paket

[<Test>]
let ``install should redirect required assemblies only``() =
let ``install should redirect required assemblies only``() =
use __ = paket "install --redirects --createnewbindingfiles" "i001187-binding-redirect" |> fst

let path = Path.Combine(scenarioTempPath "i001187-binding-redirect")
Expand Down Expand Up @@ -86,9 +86,9 @@ let ``#2408 should report wrong app.config parsing``() =
failwith "paket should fail"
with
| exn when exn.Message.Contains("Project1") && exn.Message.Contains("app.config") -> ()

[<Test>]
let ``#1218 install should replace paket's binding redirects with required only``() =
let ``#1218 install should replace paket's binding redirects with required only``() =
use __ = paket "install --redirects --createnewbindingfiles" "i001218-binding-redirect" |> fst

let path = Path.Combine(scenarioTempPath "i001218-binding-redirect")
Expand Down Expand Up @@ -166,25 +166,7 @@ let ``#1218 install should replace paket's binding redirects with required only`


[<Test>]
let ``#1270 force redirects``() =
use __ = paket "install --createnewbindingfiles" "i001270-force-redirects" |> fst
let path = Path.Combine(scenarioTempPath "i001270-force-redirects")
let configPath = Path.Combine(path, "MyClassLibrary", "MyClassLibrary", "app.config")

let ``FSharp.Core`` = """<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />"""
let AlphaFS = """<assemblyIdentity name="AlphaFS" publicKeyToken="4d31a58f7d7ad5c9" culture="neutral" />"""
let ``Newtonsoft.Json`` = """<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""
let ``Newtonsoft.Json.Schema`` = """<assemblyIdentity name="Newtonsoft.Json.Schema" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""

let config = File.ReadAllText(configPath)

config |> shouldContainText ``FSharp.Core``
config.Contains AlphaFS |> shouldEqual false
config.Contains ``Newtonsoft.Json`` |> shouldEqual false
config.Contains ``Newtonsoft.Json.Schema`` |> shouldEqual false

[<Test>]
let ``#1270 redirects from references``() =
let ``#1270 redirects from references``() =
use __ = paket "install --createnewbindingfiles" "i001270-force-redirects" |> fst
let path = Path.Combine(scenarioTempPath "i001270-force-redirects")
let configPath = Path.Combine(path, "MyClassLibrary", "MyClassLibrary2", "app.config")
Expand All @@ -202,7 +184,7 @@ let ``#1270 redirects from references``() =
config.Contains ``Newtonsoft.Json`` |> shouldEqual false

[<Test>]
let ``#1574 redirects GAC``() =
let ``#1574 redirects GAC``() =
use __ = paket "install --clean-redirects" "i001574-redirect-gac" |> fst
let path = Path.Combine(scenarioTempPath "i001574-redirect-gac")
let configPath = Path.Combine(path, "BindingRedirectPaketBug", "App.config")
Expand All @@ -220,26 +202,24 @@ let ``#1621 generates binding redirect when references project with another targ
use __ = install scenario |> fst
let ``NUnit`` = """<assemblyIdentity name="nunit.framework" publicKeyToken="2638cd05610744eb" culture="neutral" />"""
let ``NUnit correct version`` = "newVersion=\"3.0.5813.39031\""

let path = Path.Combine(scenarioTempPath scenario, "projectB")
let configPath = Path.Combine(path, "app.config")

let config = File.ReadAllText(configPath) |> normalizeLineEndings

config |> shouldContainText ``NUnit``
config |> shouldContainText ``NUnit correct version``

[<Test>]
let ``#1783 generates binding redirect when assembly with different version of main group``() =
let scenario = "i001783-different-versions"
use __ = install scenario |> fst
let ``FSharp.Core`` = """<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />"""
let ``Newtonsoft.Json`` = """<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />"""

let path = Path.Combine(scenarioTempPath scenario, "projectB")
let configPath = Path.Combine(path, "app.config")

let config = File.ReadAllText(configPath) |> normalizeLineEndings

config |> shouldContainText ``FSharp.Core``

config |> shouldContainText ``Newtonsoft.Json``
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ let ``#140 windsor should resolve framework dependent dependencies``() =
|> getExplicitRestriction
|> shouldEqual (FrameworkRestriction.Between(DotNetFramework(FrameworkVersion.V3_5), DotNetFramework(FrameworkVersion.V4)))

[<Test; Ignore "slow test">]
let ``#1182 framework restrictions overwrite each other``() =
let cleanup, lockFile = update "i001182-framework-restrictions"
use __ = cleanup
let lockFile = lockFile.ToString()
lockFile.Contains("Microsoft.Data.OData (>= 5.6.2)") |> shouldEqual true
lockFile.Contains("framework: winv4.5") |> shouldEqual false

[<Test>]
#if NO_UNIT_PLATFORMATTRIBUTE
Expand All @@ -33,50 +26,50 @@ let ``#1182 framework restrictions overwrite each other``() =
[<Platform("Mono")>] // PATH TOO LONG on Windows...
[<Flaky>] // failure on assert
#endif
let ``#1190 paket add nuget should handle transitive dependencies``() =
let ``#1190 paket add nuget should handle transitive dependencies``() =
use __ = paket "add nuget xunit version 2.1.0" "i001190-transitive-dependencies-with-restr" |> fst
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001190-transitive-dependencies-with-restr","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "xunit.abstractions"].Settings.FrameworkRestrictions
|> getExplicitRestriction
|> fun res -> res.ToString() |> shouldEqual "|| (>= dnx451) (>= dnxcore50) (>= portable-net45+win8+wp8+wpa81)"

[<Test>]
let ``#1190 paket add nuget should handle transitive dependencies with restrictions``() =
let ``#1190 paket add nuget should handle transitive dependencies with restrictions``() =
use __ = paket "add nuget xunit version 2.1.0" "i001190-transitive-deps" |> fst

let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001190-transitive-deps","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "xunit.abstractions"].Settings.FrameworkRestrictions
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction


[<Test>]
let ``#1197 framework dependencies are not restricting each other``() =
let ``#1197 framework dependencies are not restricting each other``() =
let cleanup, lockFile = update "i001197-too-strict-frameworks"
use __ = cleanup

lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "log4net"].Version
|> shouldBeGreaterThan (SemVer.Parse "0")


[<Test>]
let ``#1213 framework dependencies propagate``() =
let ``#1213 framework dependencies propagate``() =
let cleanup, lockFile = update "i001213-framework-propagation"
use __ = cleanup
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Newtonsoft.Json"].Settings.FrameworkRestrictions
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction

[<Test>]
let ``#1215 framework dependencies propagate``() =
let ``#1215 framework dependencies propagate``() =
let cleanup, lockFile = update "i001215-framework-propagation-no-restriction"
use __ = cleanup
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.Bcl.Async"].Settings.FrameworkRestrictions
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction

[<Test>]
let ``#1232 framework dependencies propagate``() =
let ``#1232 framework dependencies propagate``() =
let cleanup, lockFile = update "i001232-sql-lite"
use __ = cleanup
let restriction =
Expand All @@ -90,7 +83,7 @@ let ``#1232 framework dependencies propagate``() =
|> shouldEqual true

[<Test>]
let ``#1494 detect platform 5.0``() =
let ``#1494 detect platform 5.0``() =
use __ = update "i001494-download" |> fst

()

0 comments on commit 7703993

Please sign in to comment.