Skip to content

Commit

Permalink
build: fix integration test and lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gosteli <[email protected]>
  • Loading branch information
ghouscht committed Oct 24, 2024
1 parent bf19582 commit 7db9704
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ var dirOnlyTestCases = []testCase{
"ocaml-base-compiler": "4.14.0",
},
},
{
name: "find terraform packages",
pkgType: pkg.TerraformPkg,
pkgInfo: map[string]string{
"registry.terraform.io/hashicorp/aws": "5.72.1",
},
},
}

var commonTestCases = []testCase{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func TestPkgCoverageImage(t *testing.T) {
definedPkgs.Remove(string(pkg.OpamPkg))
definedPkgs.Remove(string(pkg.GithubActionPkg))
definedPkgs.Remove(string(pkg.GithubActionWorkflowPkg))
definedPkgs.Remove(string(pkg.TerraformPkg))

var cases []testCase
cases = append(cases, commonTestCases...)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion syft/pkg/cataloger/terraform/parse_tf_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type lockFile struct {
} `hcl:"provider,block"`
}

func parseTerraformLock(_ context.Context, resolver file.Resolver, env *generic.Environment, reader file.LocationReadCloser) ([]pkg.Package, []artifact.Relationship, error) {
func parseTerraformLock(_ context.Context, _ file.Resolver, _ *generic.Environment, reader file.LocationReadCloser) ([]pkg.Package, []artifact.Relationship, error) {
var lockFile lockFile

contents, err := io.ReadAll(reader)
Expand Down
2 changes: 1 addition & 1 deletion syft/pkg/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func TypeFromPURL(p string) Type {
return TypeByName(ptype)
}

//nolint:funlen
//nolint:funlen,gocyclo
func TypeByName(name string) Type {
switch name {
case packageurl.TypeDebian:
Expand Down

0 comments on commit 7db9704

Please sign in to comment.