[Ubuntu] Implement first Pester tests (#2270)

* implement first pester tests

* add comment for azcopy test

* remove extra importing and old function

* resolve comments

* fix typo
This commit is contained in:
Dibir Magomedsaygitov
2020-12-17 09:52:09 +03:00
committed by GitHub
parent be672cb22c
commit 2b93b03377
14 changed files with 262 additions and 137 deletions

View File

@@ -99,6 +99,11 @@
"source": "{{ template_dir }}/post-generation",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{template_dir}}/scripts/tests",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{ template_dir }}/scripts/SoftwareReport",
@@ -141,6 +146,23 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/powershellcore.sh"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1"
],
"environment_vars": [
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
@@ -190,7 +212,6 @@
"{{template_dir}}/scripts/installers/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/powershellcore.sh",
"{{template_dir}}/scripts/installers/pulumi.sh",
"{{template_dir}}/scripts/installers/ruby.sh",
"{{template_dir}}/scripts/installers/r.sh",
@@ -285,20 +306,11 @@
"script": "{{template_dir}}/scripts/base/apt-mock-remove.sh",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1"
],
"environment_vars": [
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}"
"pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}",
"pwsh -File {{user `image_folder`}}/tests/RunAll-Tests.ps1 -OutputDirectory {{user `image_folder`}}"
],
"environment_vars": [
"IMAGE_VERSION={{user `image_version`}}",
@@ -354,4 +366,4 @@
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}
]
}
}