cleanup dataXXX in /tmp

Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
Jess Frazelle 2016-12-14 15:33:29 -08:00
parent 03f5866ede
commit b5da2d13a6
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -22,6 +22,7 @@ import (
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"strings"
"testing"
@ -225,6 +226,7 @@ func TestFileServing(t *testing.T) {
if err != nil {
t.Fatalf("error creating tmp dir: %v", err)
}
defer os.RemoveAll(dir)
if err := ioutil.WriteFile(filepath.Join(dir, fname), []byte(data), 0755); err != nil {
t.Fatalf("error writing tmp file: %v", err)
}