(t *testing.T)
| 191 | } |
| 192 | |
| 193 | func createTestPluginTarball(t *testing.T) string { |
| 194 | t.Helper() |
| 195 | |
| 196 | pluginDir := createTestPluginDir(t) |
| 197 | |
| 198 | // Create tarball using the plugin package helper |
| 199 | tmpDir := filepath.Dir(pluginDir) |
| 200 | tgzPath := filepath.Join(tmpDir, "test-plugin-1.0.0.tgz") |
| 201 | tarFile, err := os.Create(tgzPath) |
| 202 | if err != nil { |
| 203 | t.Fatalf("Failed to create tarball file: %v", err) |
| 204 | } |
| 205 | defer tarFile.Close() |
| 206 | |
| 207 | if err := plugin.CreatePluginTarball(pluginDir, "test-plugin", tarFile); err != nil { |
| 208 | t.Fatalf("Failed to create tarball: %v", err) |
| 209 | } |
| 210 | |
| 211 | return tgzPath |
| 212 | } |
| 213 | |
| 214 | func createProvFile(t *testing.T, provFile, pluginTgz, hash string) { |
| 215 | t.Helper() |
no test coverage detected
searching dependent graphs…