1
1
mirror of https://github.com/goreleaser/nfpm synced 2024-09-28 20:01:55 +02:00
nfpm/deb/deb_test.go

35 lines
717 B
Go
Raw Normal View History

2018-01-04 13:31:22 +01:00
package deb
import (
"io/ioutil"
2018-01-04 13:31:22 +01:00
"testing"
2018-02-05 02:53:22 +01:00
"github.com/goreleaser/nfpm"
2018-02-05 03:54:03 +01:00
"github.com/stretchr/testify/assert"
2018-01-04 13:31:22 +01:00
)
func TestDeb(t *testing.T) {
2018-01-11 16:55:44 +01:00
var err = Default.Package(
2018-02-12 22:15:37 +01:00
nfpm.WithDefaults(nfpm.Info{
Name: "foo",
Arch: "amd64",
Depends: []string{
"bash",
},
Description: "Foo does things",
Priority: "extra",
Maintainer: "Carlos A Becker <pkg@carlosbecker.com>",
Version: "1.0.0",
Section: "default",
Homepage: "http://carlosbecker.com",
Vendor: "nope",
2018-01-11 16:55:44 +01:00
Files: map[string]string{
2018-02-05 02:36:02 +01:00
"../testdata/fake": "/usr/local/bin/fake",
"../testdata/whatever.conf": "/etc/fake/fake.conf",
2018-01-11 16:55:44 +01:00
},
2018-02-12 22:15:37 +01:00
}),
ioutil.Discard,
)
2018-01-04 13:31:22 +01:00
assert.NoError(t, err)
}