Update Go.Tests.ps1
This commit is contained in:
		
							parent
							
								
									0f6d2a4392
								
							
						
					
					
						commit
						fb117ec42a
					
				| @ -25,9 +25,13 @@ Describe "Go" { | ||||
| 
 | ||||
|    It "version is correct" { | ||||
|     [version]$Version = $env:VERSION | ||||
|     $versionOutput = (Invoke-Expression -Command "go version") -replace "v", ""  # remove "v" prefix | ||||
|     $versionOutputRaw = Invoke-Expression -Command "go version" | ||||
|      | ||||
|     # Extract the version number from the output | ||||
|     $versionOutput = ($versionOutputRaw -split " ")[2] -replace "go", "" | ||||
|      | ||||
|     $finalVersion = $Version.ToString(3) | ||||
|     If ($Version.Build -eq "0") { | ||||
|     If ($Version.Build -eq "0"){ | ||||
|         $finalVersion = $Version.ToString(2) | ||||
|     } | ||||
|     $versionOutput | Should -Match $finalVersion | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 aparnajyothi-y
						aparnajyothi-y