PsSqlTestServer

Cmdlets to provide and manage SQL servers for tests.

View the Project on GitHub abbgrade/PsSqlTestServer

Readme

PsSqlTestServer provides commands to manage SQL servers for tests.

For details, visit the GitHub Pages.

Usage

See the command reference for descriptions and examples.

Changelog

See the changelog file.

Installation

This module can be installed from PsGallery.

Install-Module -Name PsSqlTestServer -AllowPrerelease

Azure functionality is optional. For an Az 14.0.0-compatible setup, install Az.Accounts 5.0.0, Az.Resources 8.0.0, and Az.Sql 6.0.4:

Install-Module -Name Az.Accounts -RequiredVersion 5.0.0 -Scope CurrentUser
Install-Module -Name Az.Resources -RequiredVersion 8.0.0 -Scope CurrentUser
Install-Module -Name Az.Sql -RequiredVersion 6.0.4 -Scope CurrentUser

Az 14.0.0 specifies Az.Accounts 5.0.0 or later, but compatibility with later versions is not established by that dependency alone.

Az 12.0.0 specifies Az.Accounts 3.0.0 or later, Az.Resources 7.1.0, and Az.Sql 5.0.0. To install the corresponding baseline versions:

Install-Module -Name Az.Accounts -RequiredVersion 3.0.0 -Scope CurrentUser
Install-Module -Name Az.Resources -RequiredVersion 7.1.0 -Scope CurrentUser
Install-Module -Name Az.Sql -RequiredVersion 5.0.0 -Scope CurrentUser

These are the Az 12.0.0 dependencies; compatibility with PsSqlTestServer and its PsSqlClient dependency has not been established by the dependency metadata. The Az modules are not required to install or use non-Azure features.

Alternatively it can be built and installed from the sources:

  1. Install the development dependencies
  2. Download or clone it from GitHub
  3. Run the installation task:
Invoke-Build Install

Development

Build

The build scripts require InvokeBuild. If it is not installed, install it with the command Install-Module InvokeBuild -Scope CurrentUser.

You can build the module using the VS Code build task or with the command Invoke-Build Build.

Release

  1. Create a release branch using git-flow.
  2. Update the version number in the module manifest.
  3. Extend the changelog in CHANGELOG.md.
  4. If you want to create a pre-release.
    1. Push the release branch to GitHub, to publish the pre-release to PsGallery.
  5. Finish release using git-flow.
  6. Check if tags are not pushed to GitHub.
  7. Check if the release branch is deleted on GitHub.
  8. Create the release on GitHub.