2018-01-04 13:31:22 +01:00
|
|
|
package deb
|
|
|
|
|
|
|
|
import (
|
2018-01-10 00:03:01 +01:00
|
|
|
"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{
|
2018-01-10 00:03:01 +01:00
|
|
|
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
|
|
|
}),
|
2018-01-10 00:03:01 +01:00
|
|
|
ioutil.Discard,
|
|
|
|
)
|
2018-01-04 13:31:22 +01:00
|
|
|
assert.NoError(t, err)
|
|
|
|
}
|