refactor: move container generation to distro modules
This commit is contained in:
22
distro/centos/centos_test.go
Normal file
22
distro/centos/centos_test.go
Normal file
@ -0,0 +1,22 @@
|
||||
package centos
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"code.dumpstack.io/tools/out-of-tree/distro"
|
||||
)
|
||||
|
||||
func TestCentOS(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
u := CentOS{release: "7", container: "out_of_tree_centos_7"}
|
||||
|
||||
assert.Equal(u.ID(), distro.CentOS)
|
||||
assert.Equal(u.Release(), "7")
|
||||
|
||||
assert.True(u.Equal(distro.Distro{Release: "7", ID: distro.CentOS}))
|
||||
|
||||
assert.NotEmpty(u.Packages())
|
||||
}
|
Reference in New Issue
Block a user