DarthFubuMVC/bottles — pull request #97 by alistair (2013-12-02 11:03:04+00:00)
Title: Linux test improvements dux

Here are more linux improvements to unit tests. I have made a couple of changes which may or may not be smart and I will see whether im able to comment in-line for those.

rake passes with all tests.
rake integration_test currently fails on 2 tests

```
$ rake
Cleaning directory artifacts
Version: 2.0.0.52347
Restoring all the nuget package files
ripple restore
Restoring dependencies for solution bottles to /home/alistair/Projects/fubu/bottles/src/packages
/usr/bin/xbuild src/Bottles.Console/Bottles.Console.csproj /property:Configuration=Debug /property:TargetFrameworkProfile= /v:m /t:rebuild
XBuild Engine Version 3.2.7.0
Mono, Version 3.2.7.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Configuration: Debug Platform: x86
Configuration: Debug Platform: AnyCPU
mono --runtime=v4.0.30319 src/Bottles.Console/bin/Debug/BottleRunner.exe assembly-pak src/AssemblyPackage
Alias is returning 'src/AssemblyPackage'
Found 1 csproj file
Using src/AssemblyPackage/AssemblyPackage.csproj
Creating zip file src/AssemblyPackage/pak-WebContent.zip
Starting to write contents to new Zip file at src/AssemblyPackage/pak-WebContent.zip
Creating zip file src/AssemblyPackage/pak-data.zip
Starting to write contents to new Zip file at src/AssemblyPackage/pak-data.zip
No matching files for Bottle directory Config
bottles assembly-pak src/Bottles.Docs -p Bottles.Docs.csproj
Alias is returning 'src/Bottles.Docs'
Creating zip file src/Bottles.Docs/pak-WebContent.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-WebContent.zip
The file pak-WebContent.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
Creating zip file src/Bottles.Docs/pak-Data.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-Data.zip
The file pak-Data.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
Creating zip file src/Bottles.Docs/pak-Config.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-Config.zip
The file pak-Config.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
/usr/bin/xbuild src/Bottles.sln /property:Configuration=Debug /property:TargetFrameworkProfile= /v:m /t:rebuild
XBuild Engine Version 3.2.7.0
Mono, Version 3.2.7.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Sample.cs(55,38): warning CS0414: The private field `SampleService.SampleService._dependency' is assigned but its value is never used
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: AnyCPU
Harness/ServiceRunner.cs(60,17): warning CS0219: The variable `process' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(23,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(42,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(94,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(104,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(122,17): warning CS0219: The variable `runner' is assigned but its value is never used
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
The platform is
mono --runtime=v4.0.30319 src/packages/NUnit/tools/nunit-console.exe -nothread -noshadow -xml=results/Bottles.Tests-TestResults.xml "/home/alistair/Projects/fubu/bottles/src/Bottles.Tests/bin/Debug/Bottles.Tests.dll"
NUnit version 2.5.10.11092
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
OS Version: Unix 3.12.0.0
CLR Version: 4.0.30319.17020 ( 3.2.7 (branch-master/53cb3ab Fri Nov 29 22:19:59 NZDT 2013) )

ProcessModel: Default DomainUsage: Single
Execution Runtime: Default
...Found 4 bootstrappers
Bottles.Tests.Services.FakeBootstrapper
Bottles.Services.Tests.EmptyBootstrapper
Bottles.Services.Tests.NonBottleServiceBootstrapper
Bottles.Services.Tests.StubServiceBootstrapper
.Started service Bottles.Services.Tests.BottleServiceTester+InnerService
......................................................Missing required Bottle/Package dependency named 'B'
............System.ApplicationException: didn't work
....System.ApplicationException: not gonna happen
at Bottles.Tests.BottlingDiagnosticsTester.m__1 () [0x00000] in :0
at Bottles.Diagnostics.PackageLog.Execute
(System.Action continuation) [0x00000] in :0
...Alias agent created for folder /something
.Alias agent created for folder /something
.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Aliases:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
agent -> /different
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.Alias agent removed
.....Alias init-test created for folder initpath
Alias newname created for folder initpath
.Alias init-test created for folder initpath
.Alias blue created for folder initpath
.Alias init-test created for folder initpath
.Alias init-test created for folder initpath
.Alias init-test created for folder initpath
Alias newname created for folder initpath
.Initializing a new .package-manifest file at package
Alias package created for folder package
Folder package was added to the application at app
.Folder package was added to the application at app/
........ Adding Config folder for Include: config/*, Exclude:
. Adding Config folder for Include: config/*, Exclude:
... Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
. Adding WebContent folder for Include: *.*, Exclude: data/*;config/*
Adding Config folder for Include: config/*, Exclude:
...File '139f6652-b3d9-4126-b2e5-64e2aba62bef.txt' does not exist!
.File '70fcf2a8-0fc2-402c-9d8e-bfa7d075fe31.txt' defined by FileSettings.File does not exist!
...Folder 'cb14fc16-2668-41e3-b2ce-039d9085265a' does not exist!
.Folder 'affb72c3-a46c-4dbe-b336-faf4164356f1' defined by FileSettings.Folder does not exist!
..........Cleaning all exploded packages out of /home/alistair/Projects/fubu/bottles/src/Bottles.Tests/bin/Debug/app
........................worst
..System.ApplicationException: You shall not pass
at Bottles.Tests.PackageRegistryTester.m__6 (IPackageLog log) [0x00000] in :0
at Bottles.LambdaBootstrapper.Bootstrap (IPackageLog log) [0x00000] in :0
at Bottles.PackagingRuntimeGraph+c__AnonStorey1.<>m__0 (IBootstrapper cu
rrentBootstrapper, IPackageLog log) [0x00000] in :0
at Bottles.Diagnostics.PackagingDiagnosticsExtensions+c__AnonStorey0`1+c__AnonStorey1`1[Bottles.IBoot
strapper].<>m__0 () [0x00000] in :0
at Bottles.Diagnostics.PackageLog.Execute (System.Action continuation) [0x00000] in :0
..worst
................................................. Starting to write contents to new Zip file at nonexist/silly.zip
.....
Tests run: 216, Errors: 0, Failures: 0, Inconclusive: 0, Time: 14.722189 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Merging is *currently* not supported on Mono. Skipping merge...
Merging is *currently* not supported on Mono. Skipping merge...
Merging is *currently* not supported on Mono. Skipping merge...
```

```
$ rake integration_test
Cleaning directory artifacts
Version: 2.0.0.52350
Restoring all the nuget package files
ripple restore
Restoring dependencies for solution bottles to /home/alistair/Projects/fubu/bottles/src/packages
/usr/bin/xbuild src/Bottles.Console/Bottles.Console.csproj /property:Configuration=Debug /property:TargetFrameworkProfile= /v:m /t:rebuild
XBuild Engine Version 3.2.7.0
Mono, Version 3.2.7.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Configuration: Debug Platform: x86
Configuration: Debug Platform: AnyCPU
mono --runtime=v4.0.30319 src/Bottles.Console/bin/Debug/BottleRunner.exe assembly-pak src/AssemblyPackage
Alias is returning 'src/AssemblyPackage'
Found 1 csproj file
Using src/AssemblyPackage/AssemblyPackage.csproj
Creating zip file src/AssemblyPackage/pak-WebContent.zip
Starting to write contents to new Zip file at src/AssemblyPackage/pak-WebContent.zip
Creating zip file src/AssemblyPackage/pak-data.zip
Starting to write contents to new Zip file at src/AssemblyPackage/pak-data.zip
No matching files for Bottle directory Config
bottles assembly-pak src/Bottles.Docs -p Bottles.Docs.csproj
Alias is returning 'src/Bottles.Docs'
Creating zip file src/Bottles.Docs/pak-WebContent.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-WebContent.zip
The file pak-WebContent.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
Creating zip file src/Bottles.Docs/pak-Data.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-Data.zip
The file pak-Data.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
Creating zip file src/Bottles.Docs/pak-Config.zip
Starting to write contents to new Zip file at src/Bottles.Docs/pak-Config.zip
The file pak-Config.zip is already embedded in project src/Bottles.Docs/Bottles.Docs.csproj
/usr/bin/xbuild src/Bottles.sln /property:Configuration=Debug /property:TargetFrameworkProfile= /v:m /t:rebuild
XBuild Engine Version 3.2.7.0
Mono, Version 3.2.7.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Sample.cs(55,38): warning CS0414: The private field `SampleService.SampleService._dependency' is assigned but its value is never used
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: x86
Configuration: Debug Platform: AnyCPU
Harness/ServiceRunner.cs(60,17): warning CS0219: The variable `process' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(23,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(42,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(94,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(104,17): warning CS0219: The variable `runner' is assigned but its value is never used
Services/Remote/BigRemoteServicesIntegrationTester.cs(122,17): warning CS0219: The variable `runner' is assigned but its value is never used
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
The platform is
mono --runtime=v4.0.30319 src/packages/NUnit/tools/nunit-console.exe -nothread -noshadow -xml=results/Bottles.IntegrationTesting-TestResults.xml "/home/alistair/Projects/fubu/bottles/src/Bottles.IntegrationTesting/bin/Debug/Bottles.IntegrationTesting.dll"
NUnit version 2.5.10.11092
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
OS Version: Unix 3.12.0.0
CLR Version: 4.0.30319.17020 ( 3.2.7 (branch-master/53cb3ab Fri Nov 29 22:19:59 NZDT 2013) )

ProcessModel: Default DomainUsage: Single
Execution Runtime: Default
.F.......F..F
Tests run: 10, Errors: 1, Failures: 2, Inconclusive: 0, Time: 11.188006 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Errors and Failures:
1) Test Failure : Bottles.IntegrationTesting.AssemblyPackageTester.re_explode_based_on_a_newer_assembly_version
String lengths are both 10. Strings differ at index 4.
Expected: "var z = 2;"
But was: "var x = 1;"
---------------^

at FubuTestingSupport.SpecificationExtensions.ShouldEqual (System.String actual, System.Object expected) [0x00000] in :0
at Bottles.IntegrationTesting.AssemblyPackageTester.re_explode_based_on_a_newer_assembly_version () [0x00000] in :0

2) Test Error : Bottles.IntegrationTesting.ZipPackageTesting.config_bottle_should_have_proper_config_folder_in_zip
System.IO.DirectoryNotFoundException : Could not find a part of the path "/home/alistair/Projects/fubu/bottles/exploded/BottleProject/Config/1.txt".
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in :0

3) Test Failure : Bottles.IntegrationTesting.ZipPackageTesting.read_data_and_web_content_from_a_zipped_package
Expected: 0
But was: 1

at FubuTestingSupport.SpecificationExtensions.ShouldEqual (System.Object actual, System.Object expected) [0x00000] in :0
at Bottles.IntegrationTesting.IntegrationTestContext.Recompile () [0x00000] in :0
at Bottles.IntegrationTesting.ZipPackageTesting.read_data_and_web_content_from_a_zipped_package () [0x00000] in :0

rake aborted!
Command failed with status (3): [mono --runtime=v4.0.30319 src/packages/NUn...]
/home/alistair/.gem/ruby/1.9.1/gems/fuburake-0.9.5.52252/lib/nunit.rb:66:in `block in executeTests'
/home/alistair/.gem/ruby/1.9.1/gems/fuburake-0.9.5.52252/lib/nunit.rb:63:in `each'
/home/alistair/.gem/ruby/1.9.1/gems/fuburake-0.9.5.52252/lib/nunit.rb:63:in `executeTests'
/home/alistair/.gem/ruby/1.9.1/gems/fuburake-0.9.5.52252/lib/nunit.rb:37:in `block in create_task'
Tasks: TOP => integration_test
(See full trace by running task with --trace)
```