X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=blobdiff_plain;f=src%2Ftoss_test.go;h=000653d7be96cf60c8b0fd4a09961836bea880d8;hp=6cb68ebbc3f4fb0531f7910a451da27690425031;hb=2e59e1d8da61bc5dee797d351e50e8ed114aa4c7;hpb=2cad23b498bbb9fc1e929b4900b40e520017c614 diff --git a/src/toss_test.go b/src/toss_test.go index 6cb68eb..000653d 100644 --- a/src/toss_test.go +++ b/src/toss_test.go @@ -113,14 +113,14 @@ func TestTossExec(t *testing.T) { continue } ctx.Toss(ctx.Self.Id, TRx, DefaultNiceExec-1, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(rxPath)) == 0 { return false } ctx.Neigh[*nodeOur.Id].Exec = make(map[string][]string) ctx.Neigh[*nodeOur.Id].Exec[handle] = []string{"/bin/sh", "-c", "false"} ctx.Toss(ctx.Self.Id, TRx, DefaultNiceExec, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(rxPath)) == 0 { return false } @@ -133,7 +133,7 @@ func TestTossExec(t *testing.T) { ), } ctx.Toss(ctx.Self.Id, TRx, DefaultNiceExec, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(rxPath)) != 0 { return false } @@ -220,13 +220,13 @@ func TestTossFile(t *testing.T) { rxPath := filepath.Join(spool, ctx.Self.Id.String(), string(TRx)) os.Rename(filepath.Join(spool, ctx.Self.Id.String(), string(TTx)), rxPath) ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFile, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(rxPath)) == 0 { return false } ctx.Neigh[*nodeOur.Id].Incoming = &incomingPath if ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFile, - false, false, false, false, false, false, false) { + false, false, false, false, false, false, false, false) { return false } if len(dirFiles(rxPath)) != 0 { @@ -303,7 +303,7 @@ func TestTossFileSameName(t *testing.T) { os.Rename(filepath.Join(spool, ctx.Self.Id.String(), string(TTx)), rxPath) ctx.Neigh[*nodeOur.Id].Incoming = &incomingPath ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFile, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) expected := make(map[string]struct{}) expected["samefile"] = struct{}{} for i := 0; i < files-1; i++ { @@ -379,13 +379,13 @@ func TestTossFreq(t *testing.T) { os.Rename(txPath, rxPath) os.MkdirAll(txPath, os.FileMode(0700)) ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFreq, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(txPath)) != 0 || len(dirFiles(rxPath)) == 0 { return false } ctx.Neigh[*nodeOur.Id].FreqPath = &spool ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFreq, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(txPath)) != 0 || len(dirFiles(rxPath)) == 0 { return false } @@ -399,7 +399,7 @@ func TestTossFreq(t *testing.T) { } } ctx.Toss(ctx.Self.Id, TRx, DefaultNiceFreq, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(txPath)) == 0 || len(dirFiles(rxPath)) != 0 { return false } @@ -504,7 +504,7 @@ func TestTossTrns(t *testing.T) { } } ctx.Toss(ctx.Self.Id, TRx, 123, - false, false, false, false, false, false, false) + false, false, false, false, false, false, false, false) if len(dirFiles(rxPath)) != 0 { return false }