diff --git a/src/pkg/lint/rules_test.go b/src/pkg/lint/rules_test.go index 9e575aec28..6784e931e4 100644 --- a/src/pkg/lint/rules_test.go +++ b/src/pkg/lint/rules_test.go @@ -79,7 +79,7 @@ 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", @@ -87,7 +87,7 @@ func TestValidateComponent(t *testing.T) { YqPath: ".components.[0].files.[0]", }, } - require.Equal(t, expectedErr, findings) + require.Equal(t, expected, findings) require.Len(t, findings, 1) }) diff --git a/src/pkg/packager/creator/creator_test.go b/src/pkg/packager/creator/creator_test.go index d47f00dfbe..3da12fb70c 100644 --- a/src/pkg/packager/creator/creator_test.go +++ b/src/pkg/packager/creator/creator_test.go @@ -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