Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Question about filtering and invoke-vester #80

Closed
noesberger opened this issue Jan 12, 2017 · 3 comments
Closed

Question about filtering and invoke-vester #80

noesberger opened this issue Jan 12, 2017 · 3 comments

Comments

@noesberger
Copy link

I'm searching a way for doing the config management of our vCenters and vester looks very interesting. After doing some test I have some questions:

  • In the usage Instructions is described, that the config is in a config.ps1 but when I generate the config it's creating a json file. Is the documentation wrong?
  • How can I disable some tests for a specific config? Example I don't would like to do all VM tests, so I tried to change the scope in the config.json (null, remove, empty) but I'm always getting an error. Get-VM : 12.01.2017 14:47:08 Get-VM VM with name 'null' was not found using the specified filter(s)
  • Tags: In the example tags are used with "Invoke-Pester .\Vester\Tests -Tag host -ExcludeTag nfs", but invoke-vester is not supporting tags. So how I can use tags for invoke-vester.
  • I would like to create new custom tests, in the documentation you are referring to a template, but this file doesn't exist. Do I have just to write a new ps1 file in vester/tests for the needed category to start?
@chriswahl
Copy link
Member

Hey @noesberger - first off, thanks for checking out the project!

The documentation is my bad! We're tracking it in #70 as something to fix. My first step is to get the docs moved over to ReadTheDocs, which has been instantiated, and then combing through the code again with @brianbunke's notes to make sure I have it all squared away in my head, too.

I've been plowing away at code for a different project and have not been giving Vester the attention it deserves - doh! So, here's my best answers:

  • The config was changed from a PS1 to a JSON by @brianbunke a while back.
  • I believe you just leave items empty and it skips them, if not, that's a bug.
  • Tags were removed in favor of other control methods that haven't been documented yet. Basically as @brianbunke and team created the module and Invoke-Vester it was easier to use different methods such as the config itself to determine which tests to run.
  • TBD - the template is out of date, I believe.

@brianbunke
Copy link
Contributor

brianbunke commented Jan 12, 2017

Hello! You caught us in the middle of a full transition to the module...sorry you needed to show up with multiple unanswered questions. To supplement @chriswahl's answers:

  • Yes, .json now. Found it easier to export to once New-VesterConfig went into place
  • Would you provide an example of the changes you're making? Probably a bug
  • Get-Help Invoke-Vester -Examples, specifically examples 3 and 4, provide ideas of how to filter your test suite on individual runs
    • If you always want to skip a test, nulling (or commenting out) a property in config.json is recommended (with apologies to any potential bugs you found)
    • I forgot, we switched to json, you can't comment it out. Deleting the value's line is an option
  • Definitely some documentation needed here. I rewrote the tests with the goal to make it as easy as possible for new authors to contribute (so please do!), but that maybe is difficult if there's no walkthrough yet ;)

@brianbunke
Copy link
Contributor

Closing this as an inactive issue. If you still have questions, please feel free to ask! The documentation is much improved, but certainly doesn't cover everything yet.

https://wahlnetwork.github.io/Vester

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants