@@ -50,6 +50,7 @@ with multiple lines and **markdown**`
5050 }
5151 for _ , tc := range testCases {
5252 t .Run (tc .name , func (t * testing.T ) {
53+ t .Setenv ("CGO_ENABLED" , "0" ) // disable CGO to ensure we environmental differences don't interfere with the test
5354 srv := Plugin (p )
5455 cmd := srv .newCmdPluginRoot ()
5556 distDir := t .TempDir ()
@@ -74,6 +75,12 @@ with multiple lines and **markdown**`
7475 if diff := cmp .Diff (expect , fileNames (files )); diff != "" {
7576 t .Fatalf ("unexpected files in dist directory (-want +got):\n %s" , diff )
7677 }
78+ // expect SHA-256 for the zip files to differ
79+ sha1 := sha256sum (filepath .Join (distDir , "plugin-testPlugin-v1.2.3-linux-amd64.zip" ))
80+ sha2 := sha256sum (filepath .Join (distDir , "plugin-testPlugin-v1.2.3-windows-amd64.zip" ))
81+ if sha1 == sha2 {
82+ t .Fatalf ("expected SHA-256 for linux and windows zip files to differ, but they are the same: %s" , sha1 )
83+ }
7784
7885 expectPackage := PackageJSON {
7986 SchemaVersion : 1 ,
@@ -135,6 +142,7 @@ with multiple lines and **markdown**`
135142 }
136143 for _ , tc := range testCases {
137144 t .Run (tc .name , func (t * testing.T ) {
145+ t .Setenv ("CGO_ENABLED" , "0" ) // disable CGO to ensure we environmental differences don't interfere with the test
138146 srv := Plugin (p )
139147 cmd := srv .newCmdPluginRoot ()
140148 distDir := t .TempDir ()
@@ -158,6 +166,12 @@ with multiple lines and **markdown**`
158166 if diff := cmp .Diff (expect , fileNames (files )); diff != "" {
159167 t .Fatalf ("unexpected files in dist directory (-want +got):\n %s" , diff )
160168 }
169+ // expect SHA-256 for the zip files to differ
170+ sha1 := sha256sum (filepath .Join (distDir , "plugin-testPlugin-v1.2.3-windows-amd64.zip" ))
171+ sha2 := sha256sum (filepath .Join (distDir , "plugin-testPlugin-v1.2.3-darwin-amd64.zip" ))
172+ if sha1 == sha2 {
173+ t .Fatalf ("expected SHA-256 for windows and darwin zip files to differ, but they are the same: %s" , sha1 )
174+ }
161175
162176 expectPackage := PackageJSON {
163177 SchemaVersion : 1 ,
0 commit comments