|
@ -4,17 +4,16 @@ import ( |
|
|
"net/http" |
|
|
"net/http" |
|
|
"net/http/httptest" |
|
|
"net/http/httptest" |
|
|
"os" |
|
|
"os" |
|
|
|
|
|
"path" |
|
|
"strings" |
|
|
"strings" |
|
|
"testing" |
|
|
"testing" |
|
|
|
|
|
|
|
|
"github.com/zenazn/goji" |
|
|
"github.com/zenazn/goji" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
var a = 0 |
|
|
|
|
|
|
|
|
|
|
|
func TestSetup(t *testing.T) { |
|
|
func TestSetup(t *testing.T) { |
|
|
Config.siteURL = "http://linx.example.org/" |
|
|
Config.siteURL = "http://linx.example.org/" |
|
|
Config.filesDir = "/tmp/" + randomString(10) |
|
|
|
|
|
|
|
|
Config.filesDir = path.Join(os.TempDir(), randomString(10)) |
|
|
Config.metaDir = Config.filesDir + "_meta" |
|
|
Config.metaDir = Config.filesDir + "_meta" |
|
|
Config.noLogs = true |
|
|
Config.noLogs = true |
|
|
Config.siteName = "linx" |
|
|
Config.siteName = "linx" |
|
|