Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Add automated tests for kvm.ps1 #117

Closed
wants to merge 19 commits into from
Closed

Add automated tests for kvm.ps1 #117

wants to merge 19 commits into from

Conversation

analogrelay
Copy link
Contributor

Added a bunch of automated tests using Pester.

Note: I needed to patch Pester to write marker strings to stdout for TeamCity to read (as per https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity). The patch is in a personal fork of Pester.

It's all integrated into the makefile, so it works on the CI and reports detailed test failure information to the Tests tab for the build on TeamCity.

There are a couple scenarios that are not covered (they involved a lot more machine-level config I didn't want to mess with in automated tests):

  • Installation of kvm.ps1 itself
  • kvm use -persistent

@analogrelay
Copy link
Contributor Author

/cc @muratg @davidfowl @victorhurdugaci @troydai @Eilon
(who either expressed interest or have worked on kvm before and might know where my tests fall short)

param(
[string]$PesterPath = $null,
[string]$PesterRef = "anurse/teamcity",
[string]$PesterRepo = "https://github.com/anurse/Pester",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably need to find a new home before we merge :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to either contribute my change back to Pester or put our own fork up on aspnet. It's a pretty minor change, I can look at having it integrated if you're up for it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw your email, will discuss there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is out! pester/Pester#243 - Looking good for integration

@analogrelay
Copy link
Contributor Author

This has been merged in to dev. Not sure why the PR didn't close...

@analogrelay analogrelay closed this Jan 5, 2015
@troydai
Copy link
Contributor

troydai commented Jan 6, 2015

Probably because you didn't update the server branch after you rebase and squash.

@analogrelay analogrelay deleted the anurse/kvm-test branch March 9, 2015 04:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants