Skip to content

Commit

Permalink
allow extra sim params to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
stackdump committed Jul 11, 2019
1 parent 5828d40 commit aad3b39
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions simTest/EntriesBeforeChain_test.go
Expand Up @@ -29,8 +29,7 @@ func TestEntriesBeforeChain(t *testing.T) {

numEntries := 9 // set the total number of entries to add

params := map[string]string{"--debuglog": ""}
state0 := SetupSim("LLAAFF", params, 10, 0, 0, t)
state0 := SetupSim("LLAAFF", nil, 10, 0, 0, t)

var entries []interfaces.IMsg
var oneFct uint64 = factom.FactoidToFactoshi("1")
Expand Down
3 changes: 1 addition & 2 deletions simTest/EntryBatch_test.go
Expand Up @@ -31,8 +31,7 @@ func TestEntryBatch(t *testing.T) {

println(a.String())

params := map[string]string{"--debuglog": ""}
state0 := SetupSim("LLAAFF", params, 10, 0, 0, t)
state0 := SetupSim("LLAAFF", nil, 10, 0, 0, t)

var entries []interfaces.IMsg
var oneFct uint64 = factom.FactoidToFactoshi("1")
Expand Down
4 changes: 1 addition & 3 deletions simTest/HoldingRebound_test.go
Expand Up @@ -26,9 +26,7 @@ func TestHoldingRebound(t *testing.T) {

println(a.String())

params := map[string]string{"--debuglog": "."}

state0 := SetupSim("L", params, 12, 0, 0, t)
state0 := SetupSim("L", nil, 12, 0, 0, t)

e := factom.Entry{
ChainID: id,
Expand Down
4 changes: 4 additions & 0 deletions testHelper/simulation.go
Expand Up @@ -133,6 +133,10 @@ func StartSim(GivenNodes string, UserAddedOptions map[string]string) *state.Stat
func SetupSim(GivenNodes string, UserAddedOptions map[string]string, height int, electionsCnt int, RoundsCnt int, t *testing.T) *state.State {
fmt.Println("SetupSim(", GivenNodes, ",", UserAddedOptions, ",", height, ",", electionsCnt, ",", RoundsCnt, ")")

if UserAddedOptions == nil {
UserAddedOptions = make(map[string]string)
}

if UserAddedOptions["--factomhome"] == "" {
// default to create a new home dir for each sim test if not specificed
homeDir := GetSimTestHome(t)
Expand Down

0 comments on commit aad3b39

Please sign in to comment.