@@ -69,22 +69,19 @@ Describe 'Choco package generation' {
6969 @ { Version = ' 1.2.3' ; PreReleaseSuffix = ' -rc' ; ExpectedShortVersion = ' 1.2.3-rc' ; ExpectedFullVersion = ' 1.2.3-rc.99116' }
7070 @ { Version = ' 1.2.3' ; PreReleaseSuffix = ' ' ; ExpectedShortVersion = ' 1.2.3' ; ExpectedFullVersion = ' 1.2.3.99116' }
7171 ) {
72+ $unzipLocation = ' $(Split-Path -parent $MyInvocation.MyCommand.Definition)'
73+ $expectedChocoInstallContents = @ (' Install-ChocolateyZipPackage "sonarscanner-net-framework" `' ,
74+ " -Url "" https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/$ExpectedFullVersion /sonar-scanner-$ExpectedFullVersion -net-framework.zip"" `` " ,
75+ " -UnzipLocation "" $unzipLocation "" `` " ,
76+ " -ChecksumType 'sha256' `` " ,
77+ " -Checksum E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855" )
7278 Set-Version $Version $PreReleaseSuffix
73-
7479 . $PSScriptRoot / generate- packages.ps1 - sourcesDirectory . - buildId 99116
7580
76- Update-Choco - Package $netFrameworkScannerZipPath ' net-framework'
77-
78- $unzipLocation = ' $(Split-Path -parent $MyInvocation.MyCommand.Definition)'
79- Get-Content - Raw ' nuspec/chocolatey/chocolateyInstall-net-framework.ps1' | Should - BeExactly " Install-ChocolateyZipPackage "" sonarscanner-net-framework"" ``
80- -Url "" https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/$ExpectedFullVersion /sonar-scanner-$ExpectedFullVersion -net-framework.zip"" ``
81- -UnzipLocation "" $unzipLocation "" ``
82- -ChecksumType 'sha256' ``
83- -Checksum E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
84- "
81+ Update-Choco - Package " $PSScriptRoot /testcontext/build/sonarscanner-net-framework.zip" ' net-framework'
8582
83+ Get-Content ' nuspec/chocolatey/chocolateyInstall-net-framework.ps1' | Should - Be $expectedChocoInstallContents
8684 " build/sonarscanner-net-framework.$ExpectedShortVersion .nupkg" | Should - Exist
87-
8885 CheckVersion " sonarscanner-net-framework.$ExpectedShortVersion .nupkg" ' sonarscanner-net-framework.nuspec' " <version>$ExpectedShortVersion </version>"
8986 }
9087 }
0 commit comments