Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServerEndpoint: Integration test is missing for this resource #744

Closed
johlju opened this issue Aug 13, 2017 · 5 comments · Fixed by #1272
Closed

SqlServerEndpoint: Integration test is missing for this resource #744

johlju opened this issue Aug 13, 2017 · 5 comments · Fixed by #1272
Labels
enhancement The issue is an enhancement request.

Comments

@johlju
Copy link
Member

johlju commented Aug 13, 2017

Details of the scenario you tried and the problem that is occurring:
We should add an integration test for this resource.

The DSC configuration that is using the resource (as detailed as possible):
n/a

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a

What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Aug 13, 2017
@johlju johlju changed the title xSQLServerEndpoint: Integration test is missing for this resource SqlServerEndpoint: Integration test is missing for this resource Dec 23, 2017
@mdaniou
Copy link
Contributor

mdaniou commented Jan 22, 2019

@johlju I try to make that happen. ;)

Would you have a bit of code to allow me to test the integration test files created before merging anything ?
It would save me some time ...

@johlju
Copy link
Member Author

johlju commented Jan 22, 2019

You could run Invoke-Pester <testfile>and point out the integration test to run.
But I usually use AppVeyor for this, it my own AppVeyor account. I have added my fork of SqlServerDsc as a project to my AppVeyor (free) account.
Then I start of removing all unnecessary resources, examples, unit tests and integration tests (only save the essential that is needed for the new tests). Then I commit that to the branch as ‘debug-removal’. That way I speed up the testing in AppVeyor.
Then I write the new tests and each push will run the test in AppVeyor on my own AppVeyor account (your personal account).
When I’m ready and want to send in a PR, the first thing I do before that is to remove the commit “debug-removal” by running interactive rebase ‘git rebase -i my/dev’ (where my is the remote name to my fork). I will get en editor (vi) where I can say ‘drop’ the commit. Then the rebase will skip that commit and the branch is back to the original + the new tests, which I force push, and I can send in a PR of that branch.

I like to do it that way. But if you have a lab server that you can run the integration test on you can start it manually. But I think it’s easier to know that the tests will work together with the other tests, since we need to run tests against the instance name that are installed as part of the integration tests. You could of course run those integration tests first, before the new ones you create. :)

I hope it helped answer your question, if not, please ask away again :)

@mdaniou
Copy link
Contributor

mdaniou commented Jan 24, 2019

@johlju thanks for the tip, it works like a charm ! :)

I am almost done with this issue. I still have an UNunderstandable tiny bug that holds me from sending the PR 👎 :(

@johlju
Copy link
Member Author

johlju commented Jan 24, 2019

If you need another pair of eyes on the problem, then please post a link to your AppVeyor test run (and branch) and I can take a peek and see if I can be of any help :)

@mdaniou
Copy link
Contributor

mdaniou commented Jan 24, 2019

Thanks for this.
I think I'm good now.

johlju pushed a commit that referenced this issue Jan 29, 2019
- Changes to SqlServerEndpoint
  - Add integration tests (issue #744).
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants