mirror of https://github.com/markbates/pkger.git
Digging the "Dancing Queen"
This commit is contained in:
parent
93d467fbde
commit
1fa89d0323
|
@ -7,7 +7,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/here"
|
"github.com/markbates/pkger/here"
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ func Test_Info_Parse(t *testing.T) {
|
||||||
|
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
app, err := costello.NewRef()
|
app, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(app.Dir)
|
defer os.RemoveAll(app.Dir)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/markbates/pkger/here"
|
"github.com/markbates/pkger/here"
|
||||||
"github.com/markbates/pkger/parser"
|
"github.com/markbates/pkger/parser"
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/markbates/pkger/pkging/stdos"
|
"github.com/markbates/pkger/pkging/stdos"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@ -16,14 +16,14 @@ import (
|
||||||
func Test_Parser_Ref(t *testing.T) {
|
func Test_Parser_Ref(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
disk, err := stdos.New(ref.Info)
|
disk, err := stdos.New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
_, err = costello.LoadFiles("/", ref, disk)
|
_, err = pkgtest.LoadFiles("/", ref, disk)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
res, err := parser.Parse(ref.Info)
|
res, err := parser.Parse(ref.Info)
|
||||||
|
|
|
@ -69,7 +69,7 @@ func Test_Walk(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
files := map[string]os.FileInfo{}
|
files := map[string]os.FileInfo{}
|
||||||
err := Walk("/pkging/costello/testdata/ref", func(path string, info os.FileInfo, err error) error {
|
err := Walk("/pkging/pkgtest/testdata/ref", func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ func Test_Pkger_Add(t *testing.T) {
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
var exp []os.FileInfo
|
var exp []os.FileInfo
|
||||||
root := filepath.Join(cur.Dir, "pkging", "costello", "testdata", "ref")
|
root := filepath.Join(cur.Dir, "pkging", "pkgtest", "testdata", "ref")
|
||||||
err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Create(t *testing.T) {
|
func Test_Pkger_Create(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.CreateTest(t, ref, pkg)
|
pkgtest.CreateTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Current(t *testing.T) {
|
func Test_Pkger_Current(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.CurrentTest(t, ref, pkg)
|
pkgtest.CurrentTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_HTTP(t *testing.T) {
|
func Test_Pkger_HTTP(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.HTTPTest(t, ref, pkg)
|
pkgtest.HTTPTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Info(t *testing.T) {
|
func Test_Pkger_Info(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.InfoTest(t, ref, pkg)
|
pkgtest.InfoTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging"
|
"github.com/markbates/pkger/pkging"
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
|
||||||
"github.com/markbates/pkger/pkging/mem"
|
"github.com/markbates/pkger/pkging/mem"
|
||||||
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger(t *testing.T) {
|
func Test_Pkger(t *testing.T) {
|
||||||
costello.All(t, func(ref *costello.Ref) (pkging.Pkger, error) {
|
pkgtest.All(t, func(ref *pkgtest.Ref) (pkging.Pkger, error) {
|
||||||
return mem.New(ref.Info)
|
return mem.New(ref.Info)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_MkdirAll(t *testing.T) {
|
func Test_Pkger_MkdirAll(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.MkdirAllTest(t, ref, pkg)
|
pkgtest.MkdirAllTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Open(t *testing.T) {
|
func Test_Pkger_Open(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.OpenTest(t, ref, pkg)
|
pkgtest.OpenTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Remove(t *testing.T) {
|
func Test_Pkger_Remove(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.RemoveTest(t, ref, pkg)
|
pkgtest.RemoveTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_RemoveAll(t *testing.T) {
|
func Test_Pkger_RemoveAll(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.RemoveAllTest(t, ref, pkg)
|
pkgtest.RemoveAllTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Stat(t *testing.T) {
|
func Test_Pkger_Stat(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.StatTest(t, ref, pkg)
|
pkgtest.StatTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Walk(t *testing.T) {
|
func Test_Pkger_Walk(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.WalkTest(t, ref, pkg)
|
pkgtest.WalkTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -20,7 +20,7 @@ func LoadFile(name string, ref *Ref, pkg pkging.Pkger) (os.FileInfo, error) {
|
||||||
root := filepath.Join(
|
root := filepath.Join(
|
||||||
her.Module.Dir,
|
her.Module.Dir,
|
||||||
"pkging",
|
"pkging",
|
||||||
"costello",
|
"pkgtest",
|
||||||
"testdata",
|
"testdata",
|
||||||
"ref",
|
"ref",
|
||||||
name,
|
name,
|
||||||
|
@ -81,7 +81,7 @@ func LoadFiles(name string, ref *Ref, pkg pkging.Pkger) ([]os.FileInfo, error) {
|
||||||
root := filepath.Join(
|
root := filepath.Join(
|
||||||
her.Module.Dir,
|
her.Module.Dir,
|
||||||
"pkging",
|
"pkging",
|
||||||
"costello",
|
"pkgtest",
|
||||||
"testdata",
|
"testdata",
|
||||||
"ref",
|
"ref",
|
||||||
name,
|
name,
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
|
@ -24,7 +24,7 @@ func NewRef() (*Ref, error) {
|
||||||
root := filepath.Join(
|
root := filepath.Join(
|
||||||
her.Module.Dir,
|
her.Module.Dir,
|
||||||
"pkging",
|
"pkging",
|
||||||
"costello",
|
"pkgtest",
|
||||||
"testdata",
|
"testdata",
|
||||||
"ref")
|
"ref")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
@ -1,4 +1,4 @@
|
||||||
package costello
|
package pkgtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/parser"
|
"github.com/markbates/pkger/parser"
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
|
||||||
"github.com/markbates/pkger/pkging/mem"
|
"github.com/markbates/pkger/pkging/mem"
|
||||||
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/markbates/pkger/pkging/stdos"
|
"github.com/markbates/pkger/pkging/stdos"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@ -15,14 +15,14 @@ import (
|
||||||
func Test_Stuff(t *testing.T) {
|
func Test_Stuff(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
disk, err := stdos.New(ref.Info)
|
disk, err := stdos.New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
infos, err := costello.LoadFiles("/", ref, disk)
|
infos, err := pkgtest.LoadFiles("/", ref, disk)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
r.Len(infos, 34)
|
r.Len(infos, 34)
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ func Test_Stuff(t *testing.T) {
|
||||||
pkg, err := mem.UnmarshalEmbed(bb.Bytes())
|
pkg, err := mem.UnmarshalEmbed(bb.Bytes())
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.CurrentTest(t, ref, pkg)
|
pkgtest.CurrentTest(t, ref, pkg)
|
||||||
costello.InfoTest(t, ref, pkg)
|
pkgtest.InfoTest(t, ref, pkg)
|
||||||
costello.OpenTest(t, ref, pkg)
|
pkgtest.OpenTest(t, ref, pkg)
|
||||||
costello.WalkTest(t, ref, pkg)
|
pkgtest.WalkTest(t, ref, pkg)
|
||||||
|
|
||||||
_, err = pkg.Stat("/go.mod")
|
_, err = pkg.Stat("/go.mod")
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Create(t *testing.T) {
|
func Test_Pkger_Create(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.CreateTest(t, ref, pkg)
|
pkgtest.CreateTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Current(t *testing.T) {
|
func Test_Pkger_Current(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.CurrentTest(t, ref, pkg)
|
pkgtest.CurrentTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_HTTP(t *testing.T) {
|
func Test_Pkger_HTTP(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.HTTPTest(t, ref, pkg)
|
pkgtest.HTTPTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Info(t *testing.T) {
|
func Test_Pkger_Info(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.InfoTest(t, ref, pkg)
|
pkgtest.InfoTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_MkdirAll(t *testing.T) {
|
func Test_Pkger_MkdirAll(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.MkdirAllTest(t, ref, pkg)
|
pkgtest.MkdirAllTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Open(t *testing.T) {
|
func Test_Pkger_Open(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.OpenTest(t, ref, pkg)
|
pkgtest.OpenTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Remove(t *testing.T) {
|
func Test_Pkger_Remove(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.RemoveTest(t, ref, pkg)
|
pkgtest.RemoveTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_RemoveAll(t *testing.T) {
|
func Test_Pkger_RemoveAll(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.RemoveAllTest(t, ref, pkg)
|
pkgtest.RemoveAllTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Stat(t *testing.T) {
|
func Test_Pkger_Stat(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.StatTest(t, ref, pkg)
|
pkgtest.StatTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging"
|
"github.com/markbates/pkger/pkging"
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger(t *testing.T) {
|
func Test_Pkger(t *testing.T) {
|
||||||
costello.All(t, func(ref *costello.Ref) (pkging.Pkger, error) {
|
pkgtest.All(t, func(ref *pkgtest.Ref) (pkging.Pkger, error) {
|
||||||
return New(ref.Info)
|
return New(ref.Info)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,19 +4,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/markbates/pkger/pkging/costello"
|
"github.com/markbates/pkger/pkging/pkgtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pkger_Walk(t *testing.T) {
|
func Test_Pkger_Walk(t *testing.T) {
|
||||||
r := require.New(t)
|
r := require.New(t)
|
||||||
|
|
||||||
ref, err := costello.NewRef()
|
ref, err := pkgtest.NewRef()
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
defer os.RemoveAll(ref.Dir)
|
defer os.RemoveAll(ref.Dir)
|
||||||
|
|
||||||
pkg, err := New(ref.Info)
|
pkg, err := New(ref.Info)
|
||||||
r.NoError(err)
|
r.NoError(err)
|
||||||
|
|
||||||
costello.WalkTest(t, ref, pkg)
|
pkgtest.WalkTest(t, ref, pkg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue