(t *testing.T, pluginDir string)
| 354 | } |
| 355 | |
| 356 | func createTarballFromPluginDir(t *testing.T, pluginDir string) string { |
| 357 | t.Helper() |
| 358 | |
| 359 | // Create tarball using the plugin package helper |
| 360 | tmpDir := filepath.Dir(pluginDir) |
| 361 | tgzPath := filepath.Join(tmpDir, "test-plugin-1.0.0.tgz") |
| 362 | tarFile, err := os.Create(tgzPath) |
| 363 | if err != nil { |
| 364 | t.Fatalf("Failed to create tarball file: %v", err) |
| 365 | } |
| 366 | defer tarFile.Close() |
| 367 | |
| 368 | if err := plugin.CreatePluginTarball(pluginDir, "test-plugin", tarFile); err != nil { |
| 369 | t.Fatalf("Failed to create tarball: %v", err) |
| 370 | } |
| 371 | |
| 372 | return tgzPath |
| 373 | } |
| 374 | |
| 375 | func createProvFile(t *testing.T, provFile, pluginTgz, hash string) { |
| 376 | t.Helper() |
no test coverage detected
searching dependent graphs…