Skip to content

Commit

Permalink
test: improve coverage a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Oct 15, 2022
1 parent a18661b commit 46d2a44
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apk/apk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func exampleInfo() *nfpm.Info {
})
}

func TestConventionalExtension(t *testing.T) {
require.Equal(t, ".apk", Default.ConventionalExtension())
}

func TestCreateBuilderData(t *testing.T) {
info := exampleInfo()
err := info.Validate()
Expand Down
4 changes: 4 additions & 0 deletions arch/arch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func exampleInfo() *nfpm.Info {
})
}

func TestConventionalExtension(t *testing.T) {
require.Equal(t, ".pkg.tar.zst", Default.ConventionalExtension())
}

func TestArch(t *testing.T) {
for _, arch := range []string{"386", "amd64", "arm64"} {
arch := arch
Expand Down
4 changes: 4 additions & 0 deletions deb/deb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func exampleInfo() *nfpm.Info {
})
}

func TestConventionalExtension(t *testing.T) {
require.Equal(t, ".deb", Default.ConventionalExtension())
}

func TestDeb(t *testing.T) {
for _, arch := range []string{"386", "amd64"} {
arch := arch
Expand Down
4 changes: 4 additions & 0 deletions rpm/rpm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func exampleInfo() *nfpm.Info {
})
}

func TestConventionalExtension(t *testing.T) {
require.Equal(t, ".rpm", Default.ConventionalExtension())
}

func TestRPM(t *testing.T) {
f, err := os.CreateTemp("", "test.rpm")
require.NoError(t, err)
Expand Down

0 comments on commit 46d2a44

Please sign in to comment.