func newNamedTestingGateway(t *testing.T, suffix string) *Gateway {
	if testing.Short() {
		panic("newTestingGateway called during short test")
	}
	g, err := New("localhost:0", false, build.TempDir("gateway", t.Name()+suffix))
	if err != nil {
		panic(err)
	}
	return g
}
newNamedTestingGateway returns a gateway ready to use in a testing
environment. The gateway's persist folder will have the specified suffix.
package gateway
import (
	"io/ioutil"
	"net"
	"os"
	"path/filepath"
	"strconv"
	"sync"
	"testing"
	"github.com/NebulousLabs/Sia/build"
	"github.com/NebulousLabs/Sia/modules"
	siasync "github.com/NebulousLabs/Sia/sync"
)
func newTestingGateway(t *testing.T) *Gateway {
	if testing.Short() {
		panic("newTestingGateway called during short test")
	}
	g, err := New("localhost:0", false, build.TempDir("gateway", t.Name()))
	if err != nil {
		panic(err)
	}
	return g
}