Skip to content

Commit

Permalink
(cake-buildGH-2685) Added Cake.DotNetTool.Module integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead authored and augustoproiete committed Feb 27, 2021
1 parent ac26508 commit fcb20dd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
3 changes: 0 additions & 3 deletions test/dotnet.cake

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#load "./../utilities/paths.cake"

Task("Cake.DotNetTool.Module.Setup")
.Does(() =>
{
var path = Paths.Temp.Combine("./Cake.DotNetTool.Module");
CleanDirectory(path);
});

Task("Cake.DotNetTool.Module.Install")
.IsDependentOn("Cake.DotNetTool.Module.Setup")
.Does(() =>
{
// Given
var scriptPath = Paths.Temp.Combine("./Cake.DotNetTool.Module/").CombineWithFilePath("build.cake");
var script = "#tool \"dotnet:?package=Octopus.DotNet.Cli&version=7.4.6\"";
System.IO.File.WriteAllText(scriptPath.FullPath, script);
// When
CakeExecuteScript(scriptPath);
});

Task("Cake.DotNetTool.Module.Update")
.IsDependentOn("Cake.DotNetTool.Module.Install")
.Does(() =>
{
// Given
var scriptPath = Paths.Temp.Combine("./Cake.DotNetTool.Module/").CombineWithFilePath("build.cake");
var script = "#tool \"dotnet:?package=Octopus.DotNet.Cli&version=7.4.3121\"";
System.IO.File.WriteAllText(scriptPath.FullPath, script);
// When
CakeExecuteScript(scriptPath);
});

Task("Cake.DotNetTool.Module")
.IsDependentOn("Cake.DotNetTool.Module.Setup")
.IsDependentOn("Cake.DotNetTool.Module.Install")
.IsDependentOn("Cake.DotNetTool.Module.Update");
4 changes: 3 additions & 1 deletion tests/integration/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#load "./Cake.Core/Scripting/UsingDirective.cake"
#load "./Cake.Core/Tooling/ToolLocator.cake"
#load "./Cake.Core/CakeAliases.cake"
#load "./Cake.DotNetTool.Module/Cake.DotNetTool.Module.cake"

//////////////////////////////////////////////////
// ARGUMENTS
Expand Down Expand Up @@ -84,7 +85,8 @@ Task("Cake.Common")
Task("Run-All-Tests")
.IsDependentOn("Setup-Tests")
.IsDependentOn("Cake.Core")
.IsDependentOn("Cake.Common");
.IsDependentOn("Cake.Common")
.IsDependentOn("Cake.DotNetTool.Module");

//////////////////////////////////////////////////

Expand Down

0 comments on commit fcb20dd

Please sign in to comment.