talos/pkg/xfs/osroot_test.go
Mateusz Urbanek 9db6dc06c3
feat: stop mounting state partition
Fixes #11608

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-09-18 15:34:28 +02:00

32 lines
602 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 xfs_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/siderolabs/talos/pkg/xfs"
)
func TestOs(t *testing.T) {
t.Parallel()
t.Run("OSRoot", func(t *testing.T) {
t.Parallel()
root := &xfs.OSRoot{Shadow: t.TempDir()}
require.NoError(t, root.OpenFS())
t.Cleanup(func() {
require.NoError(t, root.Close())
})
testFilesystem(t, root, nil)
})
}