refactor: move container generation to distro modules
This commit is contained in:
@ -2,6 +2,10 @@ package debian
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"code.dumpstack.io/tools/out-of-tree/distro"
|
||||
)
|
||||
|
||||
func TestKernelRelease(t *testing.T) {
|
||||
@ -38,3 +42,16 @@ func TestKernelRelease(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDebian(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
u := Debian{release: Wheezy, container: "out_of_tree_debian_7"}
|
||||
|
||||
assert.Equal(u.ID(), distro.Debian)
|
||||
assert.Equal(u.Release(), "wheezy")
|
||||
|
||||
assert.True(u.Equal(distro.Distro{Release: "wheezy", ID: distro.Debian}))
|
||||
|
||||
assert.NotEmpty(u.Packages())
|
||||
}
|
||||
|
Reference in New Issue
Block a user