Split distbuild into separate tasks

This commit is contained in:
Fedor Korotkiy 2021-04-15 16:05:58 +03:00
parent 8c0112889f
commit b7c017556a
8 changed files with 15 additions and 5 deletions

3
artifacttest/README.md Normal file
View file

@ -0,0 +1,3 @@
# artifacttest
Этот пакет содержит тесты на [artifact](../distbuild/pkg/artifact).

View file

@ -1,4 +1,4 @@
package artifact_test package artifacttest
import ( import (
"errors" "errors"

View file

@ -1,4 +1,4 @@
package artifact_test package artifacttest
import ( import (
"context" "context"

3
filecachetest/README.md Normal file
View file

@ -0,0 +1,3 @@
# filecachetest
Этот пакет содержит тесты на [filecachetest](../distbuild/pkg/filecachetest).

3
tarstreamtest/README.md Normal file
View file

@ -0,0 +1,3 @@
# tarstreamtest
Этот пакет содержит тесты на [tarstream](../distbuild/pkg/tarstream).

View file

@ -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)