Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
abbgrade committed Jul 30, 2022
2 parents ce34744 + 5d45fc8 commit 6137c0e
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.2.0] - 2022-07-30

### Added

- Pipeline input for Disconnect-Service.

## [1.1.0] - 2022-07-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/Disconnect-DacService.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion src/PsDac/PsDac.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PsDac.dll'

# Version number of this module.
ModuleVersion = '1.1.0'
ModuleVersion = '1.2.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
4 changes: 4 additions & 0 deletions src/PsDac/Service/DisconnectServiceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ namespace PsDac
[OutputType(typeof(void))]
public class DisconnectServiceCommand : ClientCommand
{

[Parameter( ValueFromPipeline = true )]
public new DacServices Service { get; set; } = ConnectServiceCommand.Service;

protected override void ProcessRecord()
{
base.ProcessRecord();
Expand Down
35 changes: 35 additions & 0 deletions test/Disconnect-Service.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.0.0' }, @{ ModuleName='PsSqlClient'; ModuleVersion='1.2.0' }, @{ ModuleName='PsSmo'; ModuleVersion='0.4.0' }, @{ ModuleName='PsSqlTestServer'; ModuleVersion='1.2.0' }

Describe Connect-Service {

BeforeAll {
Import-Module $PSScriptRoot\..\publish\PsDac\PsDac.psd1 -ErrorAction Stop
}

Context TestDatabase {

BeforeAll {
$TestServer = New-SqlTestInstance
}

AfterAll {
if ( $TestServer ) {
$TestServer | Remove-SqlTestInstance
}
}

Context Connection {

BeforeAll {
$Service = $TestServer | Connect-DacService -ErrorAction Stop
}

It Disconnects {
$Service | Disconnect-DacService -ErrorAction Stop
{
$Service | Disconnect-DacService -ErrorAction Stop
} | Should -Throw
}
}
}
}

0 comments on commit 6137c0e

Please sign in to comment.