mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-10 07:01:12 +02:00
This is tricky, as containerd doesn't merge itself plugin configuration across multiple files. TOML can't load configuration correctly from concatenated files. Fixes #6390 Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
30 lines
631 B
Go
30 lines
631 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package toml_test
|
|
|
|
import (
|
|
_ "embed"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/siderolabs/talos/internal/pkg/toml"
|
|
)
|
|
|
|
//go:embed testdata/expected.toml
|
|
var expected []byte
|
|
|
|
func TestMerge(t *testing.T) {
|
|
out, err := toml.Merge([]string{
|
|
"testdata/1.toml",
|
|
"testdata/2.toml",
|
|
"testdata/3.toml",
|
|
})
|
|
require.NoError(t, err)
|
|
|
|
assert.Equal(t, expected, out)
|
|
}
|