From 567ce511a3269ab354df474454048ba0a585ee75 Mon Sep 17 00:00:00 2001 From: Donovan Date: Fri, 20 Jul 2018 08:54:31 -0500 Subject: [PATCH] Update contributing.md Adding warnings to integration test files Added settings.json for VSCode. --- .github/CONTRIBUTING.md | 29 ++++++++++++++++++------- .vscode/settings.json | 13 ++++++----- integration/test/000_team.Tests.ps1 | 6 +++++ integration/test/010_projects.Tests.ps1 | 6 +++++ 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 06ba05d77..7f641a48a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,14 +7,27 @@ I am truly grateful for all the support developing VSTeam. It means a lot that y 1. Visit [docs.microsoft.com](http://cda.ms/4j) and find the API you want to wrap. 2. Explore the API and get familiar with it. 3. Fork this repository and create a branch for your work. -4. Write help. **It is important that you do this before you start adding the function.** -5. Write unit tests. -6. Code the function. -7. Add type file. -8. Add format file. -9. Update the psd1 file. -10. Update the Readme.md file. -11. Goto 4 for next function. +4. Install the SHiPS PowerShell module +5. Write help. **It is important that you do this before you start adding the function.** +6. Write unit tests. +7. Code the function. +8. Add type file. +9. Add format file. +10. Update the psd1 file. +11. Update the Readme.md file. +12. Goto 4 for next function. + +## Running Integration tests + +**THESE TEST ARE DESTRUCTIVE. USE AN EMPTY ACCOUNT.** + +- Install SonarQube extension +- Use an empty account to run the integration tests +- Set the following Environment variables. + - $env:ACCT = VSTS Account Name or full TFS URL including collection + - $env:API_VERSION = TFS2017, TFS2018 or VSTS depending on the value used for ACCT + - $env:EMAIL = Email of user to remove and re-add to account + - $env:PAT = Personal Access token of ACCT ### Housekeeping diff --git a/.vscode/settings.json b/.vscode/settings.json index fcb704dd6..7ebd160bb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,10 @@ { -"files.exclude": { - "**/.vscode": true, - "**/docs": true, - "**/package-lock.json": true -} + "files.exclude": { + "**/.vscode": true, + "**/docs": true, + "**/package-lock.json": true + }, + "editor.tabSize": 3, + "editor.detectIndentation": false, + "editor.insertSpaces": true } \ No newline at end of file diff --git a/integration/test/000_team.Tests.ps1 b/integration/test/000_team.Tests.ps1 index bf36ebe75..7cd85880f 100644 --- a/integration/test/000_team.Tests.ps1 +++ b/integration/test/000_team.Tests.ps1 @@ -5,12 +5,18 @@ if ($null -eq $env:TEAM_CIBUILD) { Import-Module $PSScriptRoot\..\..\VSTeam.psd1 -Force } +############################################################## +# THESE TEST ARE DESTRUCTIVE. USE AN EMPTY ACCOUNT. # +############################################################## # Before running these tests you must set the following # Environment variables. # $env:API_VERSION = TFS2017, TFS2018 or VSTS depending on the value used for ACCT # $env:EMAIL = Email of user to remove and re-add to account # $env:ACCT = VSTS Account Name or full TFS URL including collection # $env:PAT = Personal Access token of ACCT +############################################################## +# THESE TEST ARE DESTRUCTIVE. USE AN EMPTY ACCOUNT. # +############################################################## Set-VSTeamAPIVersion -Version $env:API_VERSION diff --git a/integration/test/010_projects.Tests.ps1 b/integration/test/010_projects.Tests.ps1 index 02bd8fd06..46c57da7f 100644 --- a/integration/test/010_projects.Tests.ps1 +++ b/integration/test/010_projects.Tests.ps1 @@ -5,12 +5,18 @@ if ($null -eq $env:TEAM_CIBUILD) { Import-Module $PSScriptRoot\..\..\VSTeam.psd1 -Force } +############################################################## +# THESE TEST ARE DESTRUCTIVE. USE AN EMPTY ACCOUNT. # +############################################################## # Before running these tests you must set the following # Environment variables. # $env:API_VERSION = TFS2017, TFS2018 or VSTS depending on the value used for ACCT # $env:EMAIL = Email of user to remove and re-add to account # $env:ACCT = VSTS Account Name or full TFS URL including collection # $env:PAT = Personal Access token of ACCT +############################################################## +# THESE TEST ARE DESTRUCTIVE. USE AN EMPTY ACCOUNT. # +############################################################## Set-VSTeamAPIVersion -Version $env:API_VERSION