-
Notifications
You must be signed in to change notification settings - Fork 588
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 #2581 from FoothillSolutions/add-access-token-to-s…
…qlpackage add access token option to sqlpackage
- Loading branch information
Showing
4 changed files
with
67 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module Fake.Sql.SqlPackageTests | ||
|
||
open Fake.Core | ||
open Fake.Sql | ||
open Expecto | ||
|
||
[<Tests>] | ||
let tests = | ||
testList "Fake.Sql.SqlPackage.Tests" [ | ||
testCase "Test that it produces correct command when using access token" <| fun _ -> | ||
let action = "Publish" | ||
let outputPath = "" | ||
let additionalParameters = "" | ||
let variables = "" | ||
let args: SqlPackage.DeployDbArgs = | ||
{ SqlPackageToolPath = "" | ||
Action = SqlPackage.DeployAction.Deploy | ||
AccessToken = "my-access-token" | ||
Source = "" | ||
Destination = "Data Source=your-server-name.database.windows.net; Initial Catalog=your-database-name;" | ||
Timeout = None | ||
BlockOnPossibleDataLoss = None | ||
DropObjectsNotInSource = None | ||
RecreateDb = None | ||
AdditionalSqlPackageProperties = [] | ||
Variables = [] | ||
Profile = "" } | ||
|
||
let cmd = SqlPackage.formatArgument args action outputPath additionalParameters variables "AccessToken" | ||
|
||
Expect.equal cmd | ||
(sprintf "/AccessToken:\"my-access-token\" ") "expected access token to be enclosed in quotes" | ||
|
||
] |