Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Jul 23, 2024
1 parent fe757f4 commit 4a69899
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pkg/lint/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ func TestValidateComponent(t *testing.T) {
}
component := types.ZarfComponent{Files: zarfFiles}
findings := checkForUnpinnedFiles(component, 0)
expectedErr := []PackageFinding{
expected := []PackageFinding{
{
Item: fileURL,
Description: "No shasum for remote file",
Severity: SevWarn,
YqPath: ".components.[0].files.[0]",
},
}
require.Equal(t, expectedErr, findings)
require.Equal(t, expected, findings)
require.Len(t, findings, 1)
})

Expand Down
16 changes: 15 additions & 1 deletion src/pkg/packager/creator/creator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,22 @@ import (
"github.com/stretchr/testify/require"
)

type mockSchemaLoader struct {
b []byte
}

func (m *mockSchemaLoader) ReadFile(_ string) ([]byte, error) {
return m.b, nil
}

// Satisfy fs.ReadFileFS interface
func (m *mockSchemaLoader) Open(_ string) (fs.File, error) {
return nil, nil
}

func TestLoadPackageDefinition(t *testing.T) {
t.Parallel()
// TODO once creator is refactored to not expect to be in the same directory as the zarf.yaml file
// this test can be re-parallelized
tests := []struct {
name string
testDir string
Expand Down

0 comments on commit 4a69899

Please sign in to comment.