-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbundletest.go
48 lines (38 loc) · 1.19 KB
/
bundletest.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package smoketest
import (
"log"
"github.com/dapixio/fio-go"
"github.com/dapixio/stress-testing/simulate"
)
var ()
// TestBundleCount runs various tests on bundles
func TestBundleCount() (err error) {
log.Println("********* START: TestBundleCount")
var ()
// create keys for the owner and a user for each endpoint
owner, users, domain, err := simulate.NewOrg(len(FioEndpoints))
if err != nil {
return err
}
for i, endPoint := range FioEndpoints {
log.Println("bundlecost ", i, ": ", endPoint.BundleCost)
for j := 0; j <= NewBundleTxnCount; j++ {
_, ok := fio.NewAddAddress(users[i].Actor, fio.Address(users[i].Addresses[0].FioAddress), "FIO", RandomString(40))
log.Println("AddAddress: ", fio.Address(users[i].Addresses[0].FioAddress))
if !ok {
log.Println("NewAddAddress Failed: ", users[i])
}
}
}
log.Println("domain: ", domain)
log.Println("owner: ", owner)
log.Println("User1: ", users[0].Addresses[0].FioAddress)
log.Println("User1: ", users[1].Addresses[0].FioAddress)
log.Println("User1: ", users[2].Addresses[0].FioAddress)
if 1 < 0 {
log.Println("********* ERROR: TestBundleCount: ")
} else {
log.Println("********* PASS: TestBundleCount")
}
return nil
}