Refactoring file storage driver to fsstorage

This commit is contained in:
Frederick F. Kautz IV
2014-12-08 14:25:57 -08:00
parent 8a5b8ac90f
commit 0cf80e075e
5 changed files with 14 additions and 23 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
package storage
import (
"fmt"
"io/ioutil"
"log"
"net/http"
@@ -9,7 +10,7 @@ import (
)
func TestPrintsStorage(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(StorageHandler))
server := httptest.NewServer(http.HandlerFunc(storageHandler))
defer server.Close()
res, err := http.Get(server.URL)
if err != nil {
@@ -25,3 +26,7 @@ func TestPrintsStorage(t *testing.T) {
log.Fatal("Expected 'Storage', Received '" + bodyString + "'")
}
}
func storageHandler(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Storage")
}