[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
+25 -13
View File
@@ -104,6 +104,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",
@@ -146,6 +151,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": [
@@ -196,7 +218,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",
@@ -291,20 +312,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`}}",
@@ -360,4 +372,4 @@
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}
]
}
}