Files

23 lines
510 B
Go
Raw Permalink Normal View History

// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: MIT
package nfsclient
import (
"strings"
"testing"
"sourcedock.dev/petrbalvin/nfs/internal/nfs4"
)
// The NFS error carries its status into text a caller can log.
func TestNFSErrorText(t *testing.T) {
err := &NFSError{Status: nfs4.ErrNoEnt}
if !strings.Contains(err.Error(), "2") {
t.Fatalf("error text %q", err.Error())
}
if err.Error() == "" {
t.Fatal("empty error text")
}
}