github.com/cockroachdb/pebble@v1.1.2/vfs/errors_unix_test.go (about)

     1  // Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use
     2  // of this source code is governed by a BSD-style license that can be found in
     3  // the LICENSE file.
     4  
     5  //go:build darwin || dragonfly || freebsd || linux || openbsd || netbsd
     6  // +build darwin dragonfly freebsd linux openbsd netbsd
     7  
     8  package vfs
     9  
    10  import (
    11  	"testing"
    12  
    13  	"github.com/cockroachdb/errors"
    14  	"github.com/stretchr/testify/require"
    15  	"golang.org/x/sys/unix"
    16  )
    17  
    18  func TestIsNoSpaceError(t *testing.T) {
    19  	err := errors.WithStack(unix.ENOSPC)
    20  	require.True(t, IsNoSpaceError(err))
    21  }