Skip to content
Snippets Groups Projects
Commit 41d49338 authored by Marc René Arns's avatar Marc René Arns
Browse files

disable all the spec tests that are not implemented yet

parent 2ceed926
No related branches found
No related tags found
No related merge requests found
package core_readonly
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -26,86 +24,95 @@ func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base path.Absolute) fs.R
An error is only returned, if p does not exist.
`)
rd.AddTest("read file", func(t *testing.T) {
/*
rd.AddTest("read file", func(t *testing.T) {
})
})
rd.AddTest("close reader", func(t *testing.T) {
rd.AddTest("close reader", func(t *testing.T) {
})
})
rd.AddTest("reading not existing", func(t *testing.T) {
rd.AddTest("reading not existing", func(t *testing.T) {
})
})
*/
rd.AddTest(`read directory`, tests.testReadDir)
spec.AddSubSpec(rd)
exists := spectest.NewSpec("Exists", `
Exists does return, if a file or directory with the given path exists.`)
/*
exists := spectest.NewSpec("Exists", `
Exists does return, if a file or directory with the given path exists.`)
exists.AddTest(`file exists`, func(t *testing.T) {
exists.AddTest(`file exists`, func(t *testing.T) {
})
})
exists.AddTest(`dir exists`, func(t *testing.T) {
exists.AddTest(`dir exists`, func(t *testing.T) {
})
})
exists.AddTest(`file not found`, func(t *testing.T) {
exists.AddTest(`file not found`, func(t *testing.T) {
})
})
exists.AddTest(`dir not found`, func(t *testing.T) {
exists.AddTest(`dir not found`, func(t *testing.T) {
})
})
spec.AddSubSpec(exists)
spec.AddSubSpec(exists)
*/
// ModTime return the time of the last modification of p.
// It returns an error, if p does not exist.
// ModTime(p path.Relative) (time.Time, error) // wenn nicht unterstützt: immer fehler zurückgeben
modTime := spectest.NewSpec("ModTime", `
ModTime return the time of the last modification of p.
It returns an error, if p does not exist.
`)
modTime.AddTest("last modification", func(t *testing.T) {
/*
modTime := spectest.NewSpec("ModTime", `
ModTime return the time of the last modification of p.
It returns an error, if p does not exist.
`)
})
modTime.AddTest("last modification", func(t *testing.T) {
modTime.AddTest("not found", func(t *testing.T) {
})
})
modTime.AddTest("not found", func(t *testing.T) {
spec.AddSubSpec(modTime)
})
abs := spectest.NewSpec("Abs", `
Abs converts the given relative path to an absolute path, based on the base of the filesystem.
`)
spec.AddSubSpec(modTime)
*/
abs.AddTest("rel to abs", tests.testAbs)
/*
abs := spectest.NewSpec("Abs", `
Abs converts the given relative path to an absolute path, based on the base of the filesystem.
`)
spec.AddSubSpec(abs)
abs.AddTest("rel to abs", tests.testAbs)
size := spectest.NewSpec("Size", `
Size returns the size of the given p in bytes
`)
spec.AddSubSpec(abs)
*/
size.AddTest("not exists", func(t *testing.T) {
/*
size := spectest.NewSpec("Size", `
Size returns the size of the given p in bytes
`)
})
size.AddTest("not exists", func(t *testing.T) {
size.AddTest("folder", func(t *testing.T) {
})
})
size.AddTest("folder", func(t *testing.T) {
size.AddTest("file", func(t *testing.T) {
})
})
size.AddTest("file", func(t *testing.T) {
spec.AddSubSpec(size)
})
spec.AddSubSpec(size)
*/
return spec
}
package ext_deleteable
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -20,11 +18,15 @@ func Spec(c spec.Config, fn func(prepare fs.ReadOnly, base path.Absolute) fs.Ext
tests := &spectests{c, fn}
del := spectest.NewSpec("Delete", "// Delete deletes either a file or a folder.")
del.AddTest("delete file", func(t *testing.T) {})
del.AddTest("delete directory", func(t *testing.T) {})
/*
del.AddTest("delete file", func(t *testing.T) {})
del.AddTest("delete directory", func(t *testing.T) {})
*/
del.AddTest("delete directory recursively", tests.testRmDirAll)
del.AddTest("delete non existing", func(t *testing.T) {})
del.AddTest("can't delete", func(t *testing.T) {})
/*
del.AddTest("delete non existing", func(t *testing.T) {})
del.AddTest("can't delete", func(t *testing.T) {})
*/
s.AddSubSpec(del)
return s
}
package ext_meta
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -12,43 +10,49 @@ import (
func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base *path.Remote) fs.ExtMeta) *spectest.Spec {
spec := spectest.NewSpec("ExtMeta", "test spec for the ExtMeta interface")
write := spectest.NewSpec("WriteWithMeta", "WriteWithMeta behaves like Writeable.Write and only differs that the given meta data is used within the creation.")
/*
write := spectest.NewSpec("WriteWithMeta", "WriteWithMeta behaves like Writeable.Write and only differs that the given meta data is used within the creation.")
write.AddTest("write file", func(t *testing.T) {
})
write.AddTest("write file", func(t *testing.T) {
write.AddTest("overwrite file", func(t *testing.T) {
})
})
write.AddTest("overwrite file", func(t *testing.T) {
write.AddTest("write file recursive", func(t *testing.T) {
})
})
write.AddTest("write file recursive", func(t *testing.T) {
write.AddTest("write dir", func(t *testing.T) {
})
})
write.AddTest("write dir", func(t *testing.T) {
write.AddTest("overwrite dir", func(t *testing.T) {
})
})
write.AddTest("overwrite dir", func(t *testing.T) {
write.AddTest("write dir recursive", func(t *testing.T) {
})
})
write.AddTest("write dir recursive", func(t *testing.T) {
spec.AddSubSpec(write)
})
get := spectest.NewSpec("GetMeta", "GetMeta returns the meta data of a file or a folder")
get.AddTest("get meta file", func(t *testing.T) {})
get.AddTest("get meta dir", func(t *testing.T) {})
spec.AddSubSpec(get)
spec.AddSubSpec(write)
*/
set := spectest.NewSpec("SetMeta", "SetMeta sets the meta data of a file or a folder")
set.AddTest("set meta file", func(t *testing.T) {})
set.AddTest("set meta dir", func(t *testing.T) {})
spec.AddSubSpec(set)
/*
get := spectest.NewSpec("GetMeta", "GetMeta returns the meta data of a file or a folder")
get.AddTest("get meta file", func(t *testing.T) {})
get.AddTest("get meta dir", func(t *testing.T) {})
spec.AddSubSpec(get)
*/
/*
set := spectest.NewSpec("SetMeta", "SetMeta sets the meta data of a file or a folder")
set.AddTest("set meta file", func(t *testing.T) {})
set.AddTest("set meta dir", func(t *testing.T) {})
spec.AddSubSpec(set)
*/
return spec
}
package ext_modeable
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -12,42 +10,48 @@ import (
func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base path.Absolute) fs.ExtModeable) *spectest.Spec {
spec := spectest.NewSpec("ExtModeable", "test spec for the ExtModeable interface")
write := spectest.NewSpec("WriteWithMode", "WriteWithMode behaves like Writeable.Write and only differs that the given filemod is used within the creation.")
write.AddTest("write file", func(t *testing.T) {
/*
write := spectest.NewSpec("WriteWithMode", "WriteWithMode behaves like Writeable.Write and only differs that the given filemod is used within the creation.")
})
write.AddTest("write file", func(t *testing.T) {
write.AddTest("overwrite file", func(t *testing.T) {
})
})
write.AddTest("overwrite file", func(t *testing.T) {
write.AddTest("write file recursive", func(t *testing.T) {
})
})
write.AddTest("write file recursive", func(t *testing.T) {
write.AddTest("write dir", func(t *testing.T) {
})
})
write.AddTest("write dir", func(t *testing.T) {
write.AddTest("overwrite dir", func(t *testing.T) {
})
})
write.AddTest("overwrite dir", func(t *testing.T) {
write.AddTest("write dir recursive", func(t *testing.T) {
})
})
write.AddTest("write dir recursive", func(t *testing.T) {
spec.AddSubSpec(write)
})
get := spectest.NewSpec("GetMode", "Rename renames either a file or a folder.")
get.AddTest("get mode file", func(t *testing.T) {})
get.AddTest("get mode dir", func(t *testing.T) {})
spec.AddSubSpec(get)
spec.AddSubSpec(write)
*/
set := spectest.NewSpec("SetMode", "Rename renames either a file or a folder.")
set.AddTest("set mode file", func(t *testing.T) {})
set.AddTest("set mode dir", func(t *testing.T) {})
spec.AddSubSpec(set)
/*
get := spectest.NewSpec("GetMode", "Rename renames either a file or a folder.")
get.AddTest("get mode file", func(t *testing.T) {})
get.AddTest("get mode dir", func(t *testing.T) {})
spec.AddSubSpec(get)
*/
/*
set := spectest.NewSpec("SetMode", "Rename renames either a file or a folder.")
set.AddTest("set mode file", func(t *testing.T) {})
set.AddTest("set mode dir", func(t *testing.T) {})
spec.AddSubSpec(set)
*/
return spec
}
package ext_moveable
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -12,21 +10,23 @@ import (
func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base path.Absolute) fs.ExtMoveable) *spectest.Spec {
spec := spectest.NewSpec("ExtMoveable", "test spec for the ExtMoveable interface")
mountP := spectest.NewSpec("Drive", "Drive returns the drive letter (windows), UNC (windows) or mountpoint (unix) of the given relative path")
mountP.AddTest("drive letter windows", func(t *testing.T) {})
mountP.AddTest("unc windows", func(t *testing.T) {})
mountP.AddTest("mountpoint unix", func(t *testing.T) {})
mountP.AddTest("error", func(t *testing.T) {})
spec.AddSubSpec(mountP)
move := spectest.NewSpec("Move", "move is an fs optimization for moving files and directories")
move.AddTest("move src not found", func(t *testing.T) {})
move.AddTest("move trgt exists", func(t *testing.T) {})
move.AddTest("move different mountpoints", func(t *testing.T) {})
move.AddTest("move file", func(t *testing.T) {})
move.AddTest("move dir", func(t *testing.T) {})
spec.AddSubSpec(move)
/*
mountP := spectest.NewSpec("Drive", "Drive returns the drive letter (windows), UNC (windows) or mountpoint (unix) of the given relative path")
mountP.AddTest("drive letter windows", func(t *testing.T) {})
mountP.AddTest("unc windows", func(t *testing.T) {})
mountP.AddTest("mountpoint unix", func(t *testing.T) {})
mountP.AddTest("error", func(t *testing.T) {})
spec.AddSubSpec(mountP)
*/
/*
move := spectest.NewSpec("Move", "move is an fs optimization for moving files and directories")
move.AddTest("move src not found", func(t *testing.T) {})
move.AddTest("move trgt exists", func(t *testing.T) {})
move.AddTest("move different mountpoints", func(t *testing.T) {})
move.AddTest("move file", func(t *testing.T) {})
move.AddTest("move dir", func(t *testing.T) {})
spec.AddSubSpec(move)
*/
return spec
}
package ext_renameable
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -21,7 +19,8 @@ func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base path.Absolute) fs.E
ren := spectest.NewSpec("Rename", "Rename renames either a file or a folder.")
ren.AddTest("rename file", tests.testRenameFile)
ren.AddTest("rename dir", func(t *testing.T) {})
// ren.AddTest("rename dir", func(t *testing.T) {})
spec.AddSubSpec(ren)
return spec
}
package ext_spacereporter
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -11,10 +9,13 @@ import (
func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base path.Absolute) fs.ExtSpaceReporter) *spectest.Spec {
spec := spectest.NewSpec("ExtSpaceReporter", "test spec for the ExtSpaceReporter interface")
sr := spectest.NewSpec("FreeSpace", "FreeSpace returns how many bytes of space are left on the mountpoint of the given path")
sr.AddTest("has space", func(t *testing.T) {})
sr.AddTest("no space", func(t *testing.T) {})
sr.AddTest("error", func(t *testing.T) {})
spec.AddSubSpec(sr)
/*
sr := spectest.NewSpec("FreeSpace", "FreeSpace returns how many bytes of space are left on the mountpoint of the given path")
sr.AddTest("has space", func(t *testing.T) {})
sr.AddTest("no space", func(t *testing.T) {})
sr.AddTest("error", func(t *testing.T) {})
spec.AddSubSpec(sr)
*/
return spec
}
package ext_url
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -12,41 +10,51 @@ import (
func Spec(c spec.Config, fn func(prefillFS fs.ReadOnly, base *path.Remote) fs.ExtURL) *spectest.Spec {
spec := spectest.NewSpec("ExtURL", "test spec for the ExtURL interface")
host := spectest.NewSpec("HostName", "HostName returns the hostname of the url")
host.AddTest("empty", func(t *testing.T) {
/*
host := spectest.NewSpec("HostName", "HostName returns the hostname of the url")
host.AddTest("empty", func(t *testing.T) {
})
host.AddTest("ip address", func(t *testing.T) {
})
host.AddTest("ip address", func(t *testing.T) {
})
host.AddTest("domain", func(t *testing.T) {
})
host.AddTest("domain", func(t *testing.T) {
})
})
spec.AddSubSpec(host)
spec.AddSubSpec(host)
*/
port := spectest.NewSpec("Port", "Port returns the port number of the url")
port.AddTest("empty", func(t *testing.T) {
/*
port := spectest.NewSpec("Port", "Port returns the port number of the url")
port.AddTest("empty", func(t *testing.T) {
})
spec.AddSubSpec(port)
})
spec.AddSubSpec(port)
*/
username := spectest.NewSpec("UserName", "UserName returns the user name of the url")
username.AddTest("empty", func(t *testing.T) {
/*
username := spectest.NewSpec("UserName", "UserName returns the user name of the url")
username.AddTest("empty", func(t *testing.T) {
})
spec.AddSubSpec(username)
})
spec.AddSubSpec(username)
*/
password := spectest.NewSpec("Password", "Password returns the password of the url")
password.AddTest("empty", func(t *testing.T) {
/*
password := spectest.NewSpec("Password", "Password returns the password of the url")
password.AddTest("empty", func(t *testing.T) {
})
spec.AddSubSpec(password)
})
spec.AddSubSpec(password)
*/
scheme := spectest.NewSpec("Scheme", "Scheme returns the scheme of the url")
scheme.AddTest("empty", func(t *testing.T) {
/*
scheme := spectest.NewSpec("Scheme", "Scheme returns the scheme of the url")
scheme.AddTest("empty", func(t *testing.T) {
})
spec.AddSubSpec(scheme)
})
spec.AddSubSpec(scheme)
*/
return spec
}
package ext_writeable
import (
"testing"
"gitlab.com/golang-utils/fs"
"gitlab.com/golang-utils/fs/path"
"gitlab.com/golang-utils/fs/spec"
......@@ -38,21 +36,23 @@ func Spec(c spec.Config, fn func(prepareFS fs.ReadOnly, base path.Absolute) fs.E
write := spectest.NewSpec("Write", "Write writes either a file or a folder to the given path with default permissions.")
write.AddTest("write file", tests.testWriteFile)
write.AddTest("overwrite file", func(t *testing.T) {
/*
write.AddTest("overwrite file", func(t *testing.T) {
})
})
write.AddTest("write file recursive", func(t *testing.T) {
write.AddTest("write file recursive", func(t *testing.T) {
})
})
write.AddTest("write dir", func(t *testing.T) {
write.AddTest("write dir", func(t *testing.T) {
})
})
write.AddTest("overwrite dir", func(t *testing.T) {
write.AddTest("overwrite dir", func(t *testing.T) {
})
})
*/
write.AddTest("write dir recursive", tests.testMkdirAll)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment