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

SqlServerDsc: Update unit tests to use the same (newest) unit test template #999

Closed
johlju opened this issue Jan 6, 2018 · 6 comments
Closed
Labels
enhancement The issue is an enhancement request.

Comments

@johlju
Copy link
Member

johlju commented Jan 6, 2018

Details of the scenario you tried and the problem that is occurring:
Some of the unit tests are using an old unit test template. Suggest we update all the unit tests to use the latest template.

https://github.com/PowerShell/DscResources/blob/master/Tests.Template/unit_template.ps1

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 Jan 6, 2018
@TraGicCode
Copy link
Contributor

Hey @johlju ,

I would assume this would be pretty much manual work. I doubt there is some sort of migration script. Can you confirm this?

@johlju
Copy link
Member Author

johlju commented Mar 6, 2018

You are correct, this is manual work, there are no migration script. I think there are to many variants to be able to make a good migration script.

But it would be cool if there was one. Maybe we could look into that to migrate from one version of the template to the other. But many resource modules other than this one doesn’t even use the template yet.

@johlju
Copy link
Member Author

johlju commented Mar 6, 2018

With “We could look into”, I mean the community in the DscResource repo :)

johlju pushed a commit that referenced this issue Mar 12, 2018
… 1.2.1 (#1063)

- Changes to Unit Tests
  - Updated the following resources unit test template to version 1.2.1 (issue #999).
    - SqlAlias
@johlju
Copy link
Member Author

johlju commented Mar 12, 2018

@TraGicCode I was about to create an issue per resource as mentioned in PR #1063, but I realized that most resource are using 1.2.0, so I think it is just a minor tweak (copy/paste the header) to update to version 1.2.1? I do think you could change all 1.2.0 into one PR with very little work. I actually think you started with the hardest one 😄
A few have version 1.1.0 which might be a little bit more work, but might be just as easy as 1.2.0. Maybe I should create individual issues for just those issue with a template older than v1.2.0? But if you'd like I could make individual issue for all of them any way. Let me know.

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Mar 12, 2018
@TraGicCode
Copy link
Contributor

Sure go ahead and make an individual issue for each one and I assign them to me and I’ll take care of them

@johlju
Copy link
Member Author

johlju commented Mar 14, 2018

@TraGicCode I have created an issue for each unit test that are using an old template. I couldn't set you as an assignee because apparently I can only set the issue creator and team members (maintainers), strangely enough. But you can find them by searching for "Update unit tests to use the same (newest) unit test template".

If you are working on an issue on a longer period of time, just write a comment in the issue that you do, and a label it as "in progress", so nobody else start working on it. :)

Closing this issue now because we have an issue for each individual resource.

@johlju johlju closed this as completed Mar 14, 2018
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Mar 14, 2018
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

No branches or pull requests

2 participants