Split distbuild into separate tasks
This commit is contained in:
parent
8c0112889f
commit
b7c017556a
8 changed files with 15 additions and 5 deletions
3
artifacttest/README.md
Normal file
3
artifacttest/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# artifacttest
|
||||||
|
|
||||||
|
Этот пакет содержит тесты на [artifact](../distbuild/pkg/artifact).
|
|
@ -1,4 +1,4 @@
|
||||||
package artifact_test
|
package artifacttest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
|
@ -1,4 +1,4 @@
|
||||||
package artifact_test
|
package artifacttest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
3
filecachetest/README.md
Normal file
3
filecachetest/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# filecachetest
|
||||||
|
|
||||||
|
Этот пакет содержит тесты на [filecachetest](../distbuild/pkg/filecachetest).
|
3
tarstreamtest/README.md
Normal file
3
tarstreamtest/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# tarstreamtest
|
||||||
|
|
||||||
|
Этот пакет содержит тесты на [tarstream](../distbuild/pkg/tarstream).
|
|
@ -1,4 +1,4 @@
|
||||||
package tarstream
|
package tarstreamtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -8,6 +8,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
"gitlab.com/slon/shad-go/distbuild/pkg/tarstream"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,9 +31,9 @@ func TestTarStream(t *testing.T) {
|
||||||
require.NoError(t, ioutil.WriteFile(filepath.Join(from, "a", "x.bin"), []byte("xxx"), 0777))
|
require.NoError(t, ioutil.WriteFile(filepath.Join(from, "a", "x.bin"), []byte("xxx"), 0777))
|
||||||
require.NoError(t, ioutil.WriteFile(filepath.Join(from, "b", "c", "y.txt"), []byte("yyy"), 0666))
|
require.NoError(t, ioutil.WriteFile(filepath.Join(from, "b", "c", "y.txt"), []byte("yyy"), 0666))
|
||||||
|
|
||||||
require.NoError(t, Send(from, &buf))
|
require.NoError(t, tarstream.Send(from, &buf))
|
||||||
|
|
||||||
require.NoError(t, Receive(to, &buf))
|
require.NoError(t, tarstream.Receive(to, &buf))
|
||||||
|
|
||||||
checkDir := func(path string) {
|
checkDir := func(path string) {
|
||||||
st, err := os.Stat(path)
|
st, err := os.Stat(path)
|
Loading…
Reference in a new issue