mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-01 17:01:10 +01:00
This commit removes lines contains old build tag syntax. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
37 lines
724 B
Go
37 lines
724 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/.
|
|
|
|
//go:build go1.18
|
|
|
|
package configloader_test
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func FuzzConfigLoader(f *testing.F) {
|
|
files, err := filepath.Glob(filepath.Join("testdata", "*.test"))
|
|
require.NoError(f, err)
|
|
|
|
for _, file := range files {
|
|
b, err := os.ReadFile(file)
|
|
require.NoError(f, err)
|
|
f.Add(b)
|
|
}
|
|
|
|
f.Add([]byte(": \xea"))
|
|
f.Add([]byte(nil))
|
|
f.Add([]byte(""))
|
|
|
|
f.Fuzz(func(t *testing.T, b []byte) {
|
|
t.Parallel()
|
|
|
|
testConfigLoaderBytes(t, b)
|
|
})
|
|
}
|