Skip to content

Commit

Permalink
Tests (#301)
Browse files Browse the repository at this point in the history
* Add Generate.Tests.ps1

* Add ManagementGroup.Tests.ps1

* Add Resource.Tests.ps1

* Add ResourceGroup.Tests.ps1

* Add Subscription.Tests.ps1

* Rename Repository.Tests.ps1

* Update Pester.ps1
Add integration tests code
Fix file path for test functions

* Update Strings.Tests.ps1
Remove blank space

* Delete README.md

* Delete deployment/

* Update Repository.Tests.ps1
Add base code

* Add azuredeploy.jsonc
Base code

* Update Repository.Tests.ps1
Remove tenant values

* Update azuredeploy.jsonc
Remove tenant / subscription values

* Update Pester.ps1
Include General and Function tests

* Add .vscode/

* Update .gitignore
Include .vscode files

* Update .gitignore

* Add tests.yml
Base code for Azure Pipelines

* Delete test.yml
Migrating to Azure Pipelines

* Update tests.yml
Add dependency step

* Update Pester.ps1
Disable General / Functions during validation

* Update Repository.Tests.ps1
Add authentication flow

* Update Repository.Tests.ps1
Switch to Azure Pipelines env standard

* Rename Dependencies.ps1

* Update Dependencies.ps1
Add module version handling

* Update tests.yml
Fix depedencies path

* Update Repository.Tests.ps1
Fix unauthenticated sessions

* Update Dependencies.ps1
Add version logging

* Update tests.yml
Fail pipeline on any stderr

* Update Dependencies.ps1
Test output

* Update Depedencies.ps1

* Update Dependencies.ps1

* Update Dependencies.ps1

* Update tests.yml
Change default error behaviour

* Update Repository.Tests.ps1
Fix tenant lookup

* Update Dependencies.ps1
Switch to Write-Output

* Update Dependencies.ps1

* Update Repository.Tests.ps1
Add ErrorAction Stop

* Update Dependencies.ps1
Add logging commands

* Update Pester.ps1
Remove authentication logic

* Update Repository.Tests.ps1
Add authentication logic

* Update Pester.ps1
Fix env variables

* Update tests.yml
Add env variable

* Update commit

* Update Repository.Tests.ps1
Add Error Preferences

* Update Pester.ps1

* Update azuredeploy.jsonc
Switch to Management Group deployment

* Update Repository.Tests.ps1
Switch to Management Group deployment

* Update Repository.Tests.ps1
Minor refinements across the source

* Update azuredeploy.jsonc
Switch to parameter values

* Update teaks.json

* Update Repository.Tests.ps1
Fix tenant variable

* Update Repository.Tests.ps1
Refine logging messages

* Update tests.yml
Add step for publishing results

* Update tests.yml

* Update Pester.ps1
Refine logging messsage

* Update tests.yml
Fix results file lookup

* Update Repository.Tests.ps1
Refine logging messsage

* Update Pester.ps1

* Update Pester.ps1

* Update .gitignore

Remove .devcontainer exclusion

* Add .devcontainer/

* Update Pester.ps1
Modify script ordering

* Update Dockerfile

* Update devcontainer.json

* Update tests.yml
Modify job id

* Update Repository.Tests.ps1
Change logging levels and error defaults

* Delete tasks.json

* Update Dockerfile
Switch image version

* Update devcontainer.json
Add comments

* Update Dockerfile
Switch to lts-debian-11
Disable mapages-posix

* Update .gitattributes
Add shell script

* Update Repository.Tests.ps1
Additional property tests

* Update Repository.Tests.ps1

* Delete README.md
  • Loading branch information
ljtill authored Apr 19, 2021
1 parent 4b04e0f commit 80f370d
Show file tree
Hide file tree
Showing 19 changed files with 1,250 additions and 70 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/powershell:lts-debian-11

# [Option] Install zsh
ARG INSTALL_ZSH="true"
# [Option] Upgrade OS packages to their latest versions
ARG UPGRADE_PACKAGES="true"

# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
COPY library-scripts/*.sh /tmp/library-scripts/
RUN apt-get update \
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "false" \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "PowerShell",
"dockerFile": "Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.powershell",
"msazurermtools.azurerm-vscode-tools"
],
// Uncomment the next line to run commands after the container is created. This gets run in bash which is why we call `pwsh`.
"postCreateCommand": "pwsh -c './scripts/Dependencies.ps1'",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
// Add runtime environment variables
"remoteEnv": {
"ARM_TENANT_ID": "",
"ARM_SUBSCRIPTION_ID": ""
}
}
Loading

0 comments on commit 80f370d

Please sign in to comment.