Skip to content

Commit

Permalink
fix: module tests for cross-platform compatibility (#253)
Browse files Browse the repository at this point in the history
- Remove `assert.Equal` checks for `goos` and `goarch`

[internal/gomod/module_test.go]
- Remove `assert.Equal` for `goos` and `goarch`

Signed-off-by: Neil Naveen <42328488+neilnaveen@users.noreply.github.com>
  • Loading branch information
neilnaveen committed Feb 25, 2023
1 parent 0f93890 commit e219a24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
2 changes: 0 additions & 2 deletions internal/gomod/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ func TestModule_PackageURL(t *testing.T) {
Path: "github.com/CycloneDX/cyclonedx-go",
Version: "v0.1.0",
}
assert.Equal(t, "linux", goos)
assert.Equal(t, "amd64", goarch)
assert.Equal(t, "pkg:golang/github.com/CycloneDX/cyclonedx-go@v0.1.0?type=module&goos="+goos+"&goarch="+goarch, module.PackageURL())
}

Expand Down

0 comments on commit e219a24

Please sign in to comment.