Fix some naming and other modules that I missed
This commit is contained in:
parent
181e65bd21
commit
3b57cef637
|
@ -20,6 +20,7 @@ func TestContentSecurityPolicy(t *testing.T) {
|
||||||
Config.siteURL = "http://linx.example.org/"
|
Config.siteURL = "http://linx.example.org/"
|
||||||
Config.filesDir = path.Join(os.TempDir(), generateBarename())
|
Config.filesDir = path.Join(os.TempDir(), generateBarename())
|
||||||
Config.metaDir = Config.filesDir + "_meta"
|
Config.metaDir = Config.filesDir + "_meta"
|
||||||
|
Config.locksDir = Config.filesDir + "_locks"
|
||||||
Config.maxSize = 1024 * 1024 * 1024
|
Config.maxSize = 1024 * 1024 * 1024
|
||||||
Config.noLogs = true
|
Config.noLogs = true
|
||||||
Config.siteName = "linx"
|
Config.siteName = "linx"
|
||||||
|
|
|
@ -16,11 +16,11 @@ func main() {
|
||||||
"path to files directory")
|
"path to files directory")
|
||||||
flag.StringVar(&metaDir, "metapath", "meta/",
|
flag.StringVar(&metaDir, "metapath", "meta/",
|
||||||
"path to metadata directory")
|
"path to metadata directory")
|
||||||
flag.StringVar(&metaDir, "lockspath", "locks/",
|
flag.StringVar(&locksDir, "lockspath", "locks/",
|
||||||
"path to metadata directory")
|
"path to locks directory")
|
||||||
flag.BoolVar(&noLogs, "nologs", false,
|
flag.BoolVar(&noLogs, "nologs", false,
|
||||||
"don't log deleted files")
|
"don't log deleted files")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
cleanup.Cleanup(filesDir, metaDir, noLogs)
|
cleanup.Cleanup(filesDir, metaDir, locksDir, noLogs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ func main() {
|
||||||
flag.StringVar(&Config.metaDir, "metapath", "meta/",
|
flag.StringVar(&Config.metaDir, "metapath", "meta/",
|
||||||
"path to metadata directory")
|
"path to metadata directory")
|
||||||
flag.StringVar(&Config.locksDir, "lockspath", "locks/",
|
flag.StringVar(&Config.locksDir, "lockspath", "locks/",
|
||||||
"path to metadata directory")
|
"path to locks directory")
|
||||||
flag.BoolVar(&Config.basicAuth, "basicauth", false,
|
flag.BoolVar(&Config.basicAuth, "basicauth", false,
|
||||||
"allow logging by basic auth password")
|
"allow logging by basic auth password")
|
||||||
flag.BoolVar(&Config.noLogs, "nologs", false,
|
flag.BoolVar(&Config.noLogs, "nologs", false,
|
||||||
|
|
|
@ -33,6 +33,7 @@ func TestSetup(t *testing.T) {
|
||||||
Config.siteURL = "http://linx.example.org/"
|
Config.siteURL = "http://linx.example.org/"
|
||||||
Config.filesDir = path.Join(os.TempDir(), generateBarename())
|
Config.filesDir = path.Join(os.TempDir(), generateBarename())
|
||||||
Config.metaDir = Config.filesDir + "_meta"
|
Config.metaDir = Config.filesDir + "_meta"
|
||||||
|
Config.locksDir = Config.filesDir + "_locks"
|
||||||
Config.maxSize = 1024 * 1024 * 1024
|
Config.maxSize = 1024 * 1024 * 1024
|
||||||
Config.noLogs = true
|
Config.noLogs = true
|
||||||
Config.siteName = "linx"
|
Config.siteName = "linx"
|
||||||
|
@ -1255,6 +1256,7 @@ func TestInferSiteURLHTTPSFastCGI(t *testing.T) {
|
||||||
func TestShutdown(t *testing.T) {
|
func TestShutdown(t *testing.T) {
|
||||||
os.RemoveAll(Config.filesDir)
|
os.RemoveAll(Config.filesDir)
|
||||||
os.RemoveAll(Config.metaDir)
|
os.RemoveAll(Config.metaDir)
|
||||||
|
os.RemoveAll(Config.locksDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPutAndGetCLI(t *testing.T) {
|
func TestPutAndGetCLI(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue