feat!: introduce new distribution structure
BREAKING CHANGE: distro definition in the configuration files has switched
from
[[supported_kernels]]
distro_type = "Ubuntu"
distro_release = "16.04"
...
to
[[supported_kernels]]
distro = { id = "Ubuntu", release = "16.04" }
...
This commit is contained in:
@@ -7,6 +7,8 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"code.dumpstack.io/tools/out-of-tree/distro"
|
||||
|
||||
"github.com/naoina/toml"
|
||||
)
|
||||
|
||||
@@ -16,7 +18,10 @@ func TestMarshalUnmarshal(t *testing.T) {
|
||||
Type: KernelModule,
|
||||
}
|
||||
artifactCfg.SupportedKernels = append(artifactCfg.SupportedKernels,
|
||||
KernelMask{Ubuntu, "18.04", ".*", kernel{}})
|
||||
KernelMask{distro.Distro{
|
||||
ID: distro.Ubuntu,
|
||||
Release: "18.04",
|
||||
}, ".*", kernel{}})
|
||||
buf, err := toml.Marshal(&artifactCfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user