1
0
Fork 0
mirror of https://github.com/Luzifer/ansible-role-version.git synced 2024-12-25 20:11:21 +00:00
ansible-role-version/vendor/gopkg.in/src-d/go-billy.v4/helper/polyfill/polyfill_test.go

64 lines
1.3 KiB
Go
Raw Normal View History

package polyfill
import (
"path/filepath"
"testing"
"gopkg.in/src-d/go-billy.v4"
"gopkg.in/src-d/go-billy.v4/test"
. "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }
var _ = Suite(&PolyfillSuite{})
type PolyfillSuite struct {
Helper billy.Filesystem
Underlying billy.Filesystem
}
func (s *PolyfillSuite) SetUpTest(c *C) {
s.Helper = New(&test.BasicMock{})
}
func (s *PolyfillSuite) TestTempFile(c *C) {
_, err := s.Helper.TempFile("", "")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestReadDir(c *C) {
_, err := s.Helper.ReadDir("")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestMkdirAll(c *C) {
err := s.Helper.MkdirAll("", 0)
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestSymlink(c *C) {
err := s.Helper.Symlink("", "")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestReadlink(c *C) {
_, err := s.Helper.Readlink("")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestLstat(c *C) {
_, err := s.Helper.Lstat("")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestChroot(c *C) {
_, err := s.Helper.Chroot("")
c.Assert(err, Equals, billy.ErrNotSupported)
}
func (s *PolyfillSuite) TestRoot(c *C) {
c.Assert(s.Helper.Root(), Equals, string(filepath.Separator))
}