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

Move all the Pester based tests into their related task folder #202

Closed
rfennell opened this issue Nov 9, 2017 · 3 comments
Closed

Move all the Pester based tests into their related task folder #202

rfennell opened this issue Nov 9, 2017 · 3 comments

Comments

@rfennell
Copy link
Owner

rfennell commented Nov 9, 2017

As part of a revision of the CI/CD process I want to move all the current Pester tests for Powershell based tasks into the relevant Task folder. See the WIki for details of the revised structure.

The main reason for this is to allow easier running of tests sets for each separate Extension within the CI/CD pipeline, and to reflect the layout of the Typescript based tasks.

The three extensions that require this refactoring are

  • Pester
  • StyleCop
  • VersionDacpacTask

As well as moving the file the src entries need to be added to the files and contributions blocks of the vss-extension.json file e.g.

 "files": [
     {
         "path": "StyleCopTask/src"
    }
  ],
  "contributions": [
      {
        "id": "Stylecop-Runner",
        "type": "ms.vss-distributed-task.task",
        "targets": [
             "ms.vss-distributed-task.tasks"
           ],
         "properties": {
             "name": "StyleCopTask/src"
           }
     }
  ]

It is planned this work will only be done as other fixes/enhancements are made to these extensions

rfennell added a commit that referenced this issue Nov 9, 2017
Refector to the new  folder structure #202
Fixed the problem that the dictionary based tests were failing. The revised version of StyleCop 5 no longer needs the hack to force processing into 32bit
rfennell added a commit that referenced this issue Nov 10, 2017
Also improved the logic around version of pester module to be loaded.
@rfennell
Copy link
Owner Author

StyleCop in progress as part of PR #171
Pester in progress as #204

@rfennell
Copy link
Owner Author

DacPac versions tests moved

rfennell added a commit that referenced this issue Nov 17, 2017
Contains the PR #171 from @thomasddn to wrapper StyleCop 5
Also includes improved testing and a re-layout of the repo as per Issue #202 
There is a known issue that SA1650 dictionary violations are not found, this appears to be an issue with StyleCop 5, details discussed in PR #171
rfennell added a commit that referenced this issue Dec 21, 2017
* Refector tests #202
Also improved the logic around version of pester module to be loaded.

* Revised test data folder versions to allow testing on hosted build with less dummy folders

* Fixed typo in  manifest

* Revised label

* Fixed invalid test

* Fixed reload in x86 logic

* improved logging

* Altered the relaunch in x86 code

* Updated labels on task

* Allows code coverage to check .PSM1 files as well as PS1

* Fixed the moule load tests so that they are fully mocked

* Removing stranhe write-host that got committed in error

* FIx pwd to psscriptroot to ensure it loads from the script location rather than wherever the current location is.

Shouldn't be a problem usually as the tasks run from the same location as the file but makes debugging manually a little easier and ensures a bit more consistency with how the task will run.

* Update to match correct name of assert.

* Update tests to ensure they always load the version of pester with the task.

* fix other tests to use version with task

* mock import-module to prevent loading another version of the same module.
@rfennell
Copy link
Owner Author

All now completed

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

No branches or pull requests

2 participants