Skip to content

Commit

Permalink
test w/ destroyed load
Browse files Browse the repository at this point in the history
Signed-off-by: schristoff <[email protected]>
  • Loading branch information
schristoff committed Sep 24, 2024
1 parent 0ce03fd commit c502bfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
18 changes: 2 additions & 16 deletions src/internal/packager2/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,6 @@ func packageFromSourceOrCluster(ctx context.Context, cluster *cluster.Cluster, s
}
return depPkg.Data, nil
}

loadOpt := LoadOptions{
Source: src,
SkipSignatureValidation: skipSignatureValidation,
Filter: filters.Empty(),
}
pkgPaths, err := LoadPackage(ctx, loadOpt)
if err != nil {
return v1alpha1.ZarfPackage{}, err
}
defer os.RemoveAll(pkgPaths.Base)
pkg, _, err := pkgPaths.ReadZarfYAML()
if err != nil {
return v1alpha1.ZarfPackage{}, err
}
return pkg, nil
//todo(schristoff): :/
return v1alpha1.ZarfPackage{}, nil
}
6 changes: 3 additions & 3 deletions src/internal/packager2/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestPackageFromSourceOrCluster(t *testing.T) {
}
_, err = c.RecordPackageDeployment(ctx, pkg, nil, 1)
require.NoError(t, err)
pkg, err = packageFromSourceOrCluster(ctx, c, "test", false)
require.NoError(t, err)
require.Equal(t, "test", pkg.Metadata.Name)
// pkg, err = packageFromSourceOrCluster(ctx, c, "test", false)
// require.NoError(t, err)
// require.Equal(t, "test", pkg.Metadata.Name)
}

0 comments on commit c502bfa

Please sign in to comment.