-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Integration tests - closes #894
- Loading branch information
Showing
42 changed files
with
361 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace System | ||
open System.Reflection | ||
|
||
[<assembly: AssemblyTitleAttribute("Paket.IntegrationTests")>] | ||
[<assembly: AssemblyProductAttribute("Paket")>] | ||
[<assembly: AssemblyDescriptionAttribute("A description")>] | ||
[<assembly: AssemblyCompanyAttribute("Two, Authors")>] | ||
[<assembly: AssemblyVersionAttribute("1.0.0.0")>] | ||
do () |
173 changes: 173 additions & 0 deletions
173
integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{7234b9b4-8cf5-4e68-aa29-050c087b9246}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>Paket.Tests</RootNamespace> | ||
<AssemblyName>Paket.IntegrationTests</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<TargetFSharpCoreVersion>4.3.0.0</TargetFSharpCoreVersion> | ||
<Name>Paket.Tests</Name> | ||
<TargetFrameworkProfile /> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> | ||
<RestorePackages>true</RestorePackages> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<Tailcalls>false</Tailcalls> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile> | ||
</DocumentationFile> | ||
<StartAction>Project</StartAction> | ||
<StartProgram> | ||
</StartProgram> | ||
<StartArguments> | ||
</StartArguments> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<Tailcalls>true</Tailcalls> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile> | ||
</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Choose> | ||
<When Condition="'$(VisualStudioVersion)' != '11.0' and Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')"> | ||
<PropertyGroup> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets')"> | ||
<PropertyGroup> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')"> | ||
<PropertyGroup> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets')"> | ||
<PropertyGroup> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
<Import Project="$(FSharpTargetsPath)" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
<Import Project="$(SolutionDir)\.paket\paket.targets" /> | ||
<ItemGroup> | ||
<Compile Include="..\..\paket-files\test\forki\FsUnit\FsUnit.fs"> | ||
<Paket>True</Paket> | ||
<Link>FsUnit.fs</Link> | ||
</Compile> | ||
<Compile Include="AssemblyInfo.fs" /> | ||
<Compile Include="TestHelper.fs" /> | ||
<Compile Include="ResolverFailsFastSpecs.fs" /> | ||
<None Include="paket.references" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="FakeLib"> | ||
<HintPath>..\..\packages\build\FAKE\tools\FakeLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Numerics" /> | ||
<Reference Include="System.Security" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
</ItemGroup> | ||
<Import Project="Paket.Tests.paket.targets" Condition="Exists('Paket.Tests.paket.targets')" /> | ||
<Choose> | ||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0' Or $(TargetFrameworkVersion) == 'v3.5')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="($(TargetFrameworkIdentifier) == '.NETCore') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac') Or ($(TargetFrameworkProfile) == 'Profile7') Or ($(TargetFrameworkProfile) == 'Profile44')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="($(TargetFrameworkIdentifier) == 'MonoAndroid') Or ($(TargetFrameworkIdentifier) == 'MonoTouch') Or ($(TargetFrameworkIdentifier) == 'Xamarin.iOS')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="($(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0') Or ($(TargetFrameworkProfile) == 'Profile24') Or ($(TargetFrameworkProfile) == 'Profile47')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="($(TargetFrameworkIdentifier) == 'WindowsPhone' And ($(TargetFrameworkVersion) == 'v8.0' Or $(TargetFrameworkVersion) == 'v8.1')) Or ($(TargetFrameworkProfile) == 'Profile31') Or ($(TargetFrameworkProfile) == 'Profile49') Or ($(TargetFrameworkProfile) == 'Profile78')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
<When Condition="($(TargetFrameworkIdentifier) == 'WindowsPhoneApp') Or ($(TargetFrameworkProfile) == 'Profile32') Or ($(TargetFrameworkProfile) == 'Profile84') Or ($(TargetFrameworkProfile) == 'Profile111') Or ($(TargetFrameworkProfile) == 'Profile151') Or ($(TargetFrameworkProfile) == 'Profile157') Or ($(TargetFrameworkProfile) == 'Profile259')"> | ||
<ItemGroup> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
</Choose> | ||
<ItemGroup> | ||
<Reference Include="nunit.framework"> | ||
<HintPath>..\..\packages\test\NUnit\lib\nunit.framework.dll</HintPath> | ||
<Private>True</Private> | ||
<Paket>True</Paket> | ||
</Reference> | ||
</ItemGroup> | ||
</Project> |
16 changes: 16 additions & 0 deletions
16
integrationtests/Paket.IntegrationTests/ResolverFailsFastSpecs.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Paket.IntegrationTests.ResolverFailsFastSpecs | ||
|
||
open Fake | ||
open System | ||
open NUnit.Framework | ||
open FsUnit | ||
open System | ||
open System.IO | ||
|
||
[<Test>] | ||
let ``#166 Should resolve Nancy without timeount``() = | ||
update "i001166-resolve-nancy-fast" | ||
|
||
[<Test>] | ||
let ``#1174 Should find Ninject error``() = | ||
updateShouldFindPackageConflict "Ninject" "i001174-resolve-fast-conflict" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[<AutoOpen>] | ||
module Paket.IntegrationTests.TestHelpers | ||
|
||
open Fake | ||
open System | ||
open NUnit.Framework | ||
open FsUnit | ||
open System | ||
open System.IO | ||
|
||
let paketToolPath = FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.exe") | ||
let integrationTestPath = FullName(__SOURCE_DIRECTORY__ + "../../../integrationtests/scenarios") | ||
|
||
let update scenario = | ||
let result = | ||
ExecProcessAndReturnMessages (fun info -> | ||
info.FileName <- paketToolPath | ||
info.WorkingDirectory <- Path.Combine(integrationTestPath,scenario) | ||
info.Arguments <- "update") (System.TimeSpan.FromMinutes 1.) | ||
if result.ExitCode <> 0 then | ||
let errors = String.Join(Environment.NewLine,result.Errors) | ||
failwith errors | ||
|
||
let updateShouldFindPackageConflict packageName scenario = | ||
try | ||
update scenario | ||
failwith "No conflict was found." | ||
with | ||
| exn when exn.Message.Contains(sprintf "Could not resolve package %s:" packageName) -> () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FSharp.Core | ||
|
||
group Test | ||
NUnit | ||
NUnit.Runners.Net4 | ||
File:FsUnit.fs . |
14 changes: 14 additions & 0 deletions
14
integrationtests/scenarios/i001166-resolve-nancy-fast/paket.dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
source https://nuget.org/api/v2 | ||
|
||
nuget FSharp.Formatting | ||
nuget Microsoft.AspNet.SignalR.Core | ||
nuget Microsoft.AspNet.SignalR.JS | ||
nuget Microsoft.Owin.Hosting | ||
nuget Microsoft.Owin.Security.Cookies | ||
nuget Nancy 1.2.0 | ||
nuget Nancy.MSOwinSecurity | ||
nuget NUnit | ||
nuget NUnit.Runners | ||
nuget FAKE | ||
nuget SourceLink.Fake | ||
nuget Nancy.Serialization.JsonNet |
7 changes: 7 additions & 0 deletions
7
integrationtests/scenarios/i001174-resolve-fast-conflict/paket.dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source https://nuget.org/api/v2 | ||
|
||
nuget Microsoft.AspNet.SignalR.JS | ||
nuget Nancy.Serialization.JsonNet | ||
nuget SourceLink.Fake | ||
nuget Ninject.Extensions.Logging.Log4net == 3.2.0 | ||
nuget Ninject.Extensions.Interception.Linfu == 2.2.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.