-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2428 from ids-pfinn/octopus-deploy-trance-always-…
…marked-failures Octopus deploy trance always marked failures
- Loading branch information
Showing
3 changed files
with
158 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
module Fake.Tools.Testing.Octo | ||
|
||
open Expecto | ||
|
||
[<Tests>] | ||
let defaultTests = | ||
testList "Fake.Tools.Octo Tests" [ | ||
testCase "Create Release Default" <| fun _ -> | ||
let expectedCommand = [ | ||
"create-release" | ||
] | ||
let actual = | ||
(Fake.Tools.Octo.releaseOptions, None) | ||
|> Fake.Tools.Octo.Command.CreateRelease | ||
|> Fake.Tools.Octo.commandLine | ||
Expect.hasLength actual expectedCommand.Length "With default options only expect the command" | ||
Expect.sequenceEqual actual expectedCommand "CreateRelease command should be the create-release string" | ||
|
||
testCase "Create Release Fully Filled Out" <| fun _ -> | ||
let expectedCommand = [ | ||
"create-release" | ||
"--project=Project-1" | ||
"--version=Version-1" | ||
"--packageversion=PackageVersion-1" | ||
" --package=Package-1 --package=Package-2" | ||
"--packagesfolder=PackageFolder-1" | ||
"--releasenotes=ReleaseNotes-1" | ||
"--releasenotesfile=ReleaseNotesFile-1" | ||
" --ignoreExisting" | ||
"--channel=Channel-1" | ||
" --ignorechannelrules" | ||
] | ||
let releaseOptions = { | ||
Fake.Tools.Octo.releaseOptions with | ||
Project="Project-1" | ||
Version="Version-1" | ||
PackageVersion="PackageVersion-1" | ||
Packages=["Package-1"; "Package-2"] | ||
PackagesFolder=Some "PackageFolder-1" | ||
ReleaseNotes="ReleaseNotes-1" | ||
ReleaseNotesFile="ReleaseNotesFile-1" | ||
IgnoreExisting=true | ||
Channel=Some "Channel-1" | ||
Common=Fake.Tools.Octo.commonOptions | ||
IgnoreChannelRules=true | ||
} | ||
let actual = | ||
(releaseOptions, None) | ||
|> Fake.Tools.Octo.Command.CreateRelease | ||
|> Fake.Tools.Octo.commandLine | ||
Expect.hasLength actual expectedCommand.Length "With default options only expect the command" | ||
Expect.sequenceEqual actual expectedCommand "CreateRelease command should be the create-release string" | ||
] |