Cleanup artifacts
This commit is contained in:
parent
084c267112
commit
f0b1a8e47b
|
@ -16,7 +16,6 @@ import (
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
Config.siteURL = "http://linx.example.org/"
|
Config.siteURL = "http://linx.example.org/"
|
||||||
Config.filesDir = path.Join(os.TempDir(), randomString(10))
|
Config.filesDir = path.Join(os.TempDir(), randomString(10))
|
||||||
t.Log(os.TempDir())
|
|
||||||
Config.metaDir = Config.filesDir + "_meta"
|
Config.metaDir = Config.filesDir + "_meta"
|
||||||
Config.noLogs = true
|
Config.noLogs = true
|
||||||
Config.siteName = "linx"
|
Config.siteName = "linx"
|
||||||
|
@ -183,13 +182,6 @@ func TestPutUpload(t *testing.T) {
|
||||||
if w.Body.String() != Config.siteURL+filename {
|
if w.Body.String() != Config.siteURL+filename {
|
||||||
t.Fatal("Response was not expected URL")
|
t.Fatal("Response was not expected URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
// if w.Code != 301 {
|
|
||||||
// t.Fatalf("Status code is not 301, but %d", w.Code)
|
|
||||||
// }
|
|
||||||
// if w.Header().Get("Location") != "/"+filename {
|
|
||||||
// t.Fatalf("Was redirected to %s instead of /%s", w.Header().Get("Location"), filename)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPutRandomizedUpload(t *testing.T) {
|
func TestPutRandomizedUpload(t *testing.T) {
|
||||||
|
|
|
@ -119,9 +119,6 @@ func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func processUpload(upReq UploadRequest) (upload Upload, err error) {
|
func processUpload(upReq UploadRequest) (upload Upload, err error) {
|
||||||
|
|
||||||
// if UploadRequest.src
|
|
||||||
|
|
||||||
// Determine the appropriate filename, then write to disk
|
// Determine the appropriate filename, then write to disk
|
||||||
barename, extension := barePlusExt(upReq.filename)
|
barename, extension := barePlusExt(upReq.filename)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue