mirror of
https://github.com/logos-storage/logos-storage-network-testing.git
synced 2026-01-04 06:23:07 +00:00
Add makefile
This commit is contained in:
parent
490d388dca
commit
1b8b080e24
9
Makefile
Normal file
9
Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
# Create a makefile that runs all the tests in tests/
|
||||
|
||||
SRC = $(wildcard tests/*.go)
|
||||
|
||||
all:
|
||||
go test $(SRC)
|
||||
|
||||
verbose:
|
||||
go test -v $(SRC)
|
||||
@ -28,8 +28,8 @@ func TestUpload1(t *testing.T) {
|
||||
group, groupCtx := errgroup.WithContext(context.Background())
|
||||
addrs := "127.0.0.1"
|
||||
for i, node := range nodes {
|
||||
id := i
|
||||
node := node.Context(groupCtx)
|
||||
if i <= 1 {
|
||||
group.Go(func() error {
|
||||
// gets node ip
|
||||
ip, err := getIp(groupCtx, node)
|
||||
@ -54,9 +54,10 @@ func TestUpload1(t *testing.T) {
|
||||
runout := &bytes.Buffer{}
|
||||
runerr := &bytes.Buffer{}
|
||||
time.Sleep(2 * time.Second)
|
||||
if i == 1 {
|
||||
|
||||
if id == 1 {
|
||||
node.SendFile("tests/dog1.txt", bytes.NewBuffer([]byte("hello my dog")))
|
||||
for x := 0; x < 2; x++ {
|
||||
for x := 0; x < 10; x++ {
|
||||
group.Go(func() error {
|
||||
proc, err := node.StartProc(cluster.StartProcRequest{
|
||||
Command: "curl",
|
||||
@ -72,7 +73,6 @@ func TestUpload1(t *testing.T) {
|
||||
t.Errorf(Fatal("HOST EOutput: %s\n", err))
|
||||
return err
|
||||
}
|
||||
t.Log(Info("HOST Output: ") + runout.String())
|
||||
assert.Equal(t, 0, code.ExitCode, "HOST EOutput: %s\n", runerr.String())
|
||||
return nil
|
||||
})
|
||||
@ -81,7 +81,6 @@ func TestUpload1(t *testing.T) {
|
||||
return nil
|
||||
})
|
||||
}
|
||||
}
|
||||
group.Wait()
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user