1
1
mirror of https://github.com/goreleaser/nfpm synced 2024-09-22 09:52:33 +02:00
nfpm/deb/deb_test.go
Carlos Alexandro Becker 3ef70e5c0e
root owner and group
2018-01-04 11:36:58 -02:00

31 lines
711 B
Go

package deb
import (
"context"
"testing"
"github.com/caarlos0/pkg"
"github.com/tj/assert"
)
func TestDeb(t *testing.T) {
deb, err := New(context.Background(), pkg.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",
}, "/tmp/foo_1.0.0-0.deb")
assert.NoError(t, err)
assert.NoError(t, deb.Add("./testdata/fake", "/usr/local/bin/fake"))
assert.NoError(t, deb.Add("./testdata/whatever.conf", "/etc/fake/fake.conf"))
assert.NoError(t, deb.Close())
}