From 1ef3339658fcf902799dfe6c55a8b75d359c19ae Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 18 Feb 2021 09:03:13 +0300 Subject: [PATCH] [Ubuntu] Do not import Az.Account module on Ubuntu 18.04 (#2729) * do not install dbus-user-session on Ubuntu 18.04 * update test for Ubuntu 18.04 * revert changes * do not import Az.Accounts module * remove space * update PowerShell test --- images/linux/scripts/installers/containers.sh | 6 +----- images/linux/scripts/tests/PowerShellModules.Tests.ps1 | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/images/linux/scripts/installers/containers.sh b/images/linux/scripts/installers/containers.sh index ea18f32ff..3ae559f68 100644 --- a/images/linux/scripts/installers/containers.sh +++ b/images/linux/scripts/installers/containers.sh @@ -4,8 +4,6 @@ ## Desc: Installs container tools: podman, buildah and skopeo onto the image ################################################################################ -source $HELPER_SCRIPTS/os.sh - # Install podman, buildah, scopeo container's tools install_packages=(podman buildah skopeo) source /etc/os-release @@ -17,6 +15,4 @@ apt-get -qq -y install ${install_packages[@]} mkdir -p /etc/containers echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf -if isUbuntu18 || isUbuntu20 ; then - invoke_tests "Tools" "Containers" -fi \ No newline at end of file +invoke_tests "Tools" "Containers" diff --git a/images/linux/scripts/tests/PowerShellModules.Tests.ps1 b/images/linux/scripts/tests/PowerShellModules.Tests.ps1 index e7374742a..cd4f4b469 100644 --- a/images/linux/scripts/tests/PowerShellModules.Tests.ps1 +++ b/images/linux/scripts/tests/PowerShellModules.Tests.ps1 @@ -30,7 +30,6 @@ Describe "AzureModules" { $moduleName = $module.name Context "$moduleName" { - foreach ($version in $module.versions) { $modulePath = Join-Path -Path $modulesRootPath -ChildPath "${moduleName}_${version}" $moduleInfo = @{ moduleName = $moduleName; modulePath = $modulePath; expectedVersion = $version } @@ -42,9 +41,7 @@ Describe "AzureModules" { ) $env:PSModulePath = "${modulePath}:${env:PSModulePath}" - Import-Module -Name $moduleName - (Get-Module -Name $moduleName).Version.ToString() - + (Get-Module -ListAvailable -Name $moduleName).Version.ToString() } -ArgumentList $modulePath, $moduleName $moduleVersion = $testJob | Wait-Job | Receive-Job