From 7eae4ede4205a2d9ecdcadc93cd314a73180eaeb Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Wed, 16 Mar 2016 17:29:54 +0100 Subject: [PATCH] Change tests to conform with new API. Semantics of tests not changed. --- swarm/api/api_test.go | 2 +- swarm/api/filesystem_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/swarm/api/api_test.go b/swarm/api/api_test.go index 7db209c9d4..0ee3ca8df7 100644 --- a/swarm/api/api_test.go +++ b/swarm/api/api_test.go @@ -63,7 +63,7 @@ func expResponse(content string, mimeType string, status int) *Response { // func testGet(t *testing.T, api *Api, bzzhash string) *testResponse { func testGet(t *testing.T, api *Api, bzzhash string) *testResponse { - reader, mimeType, status, err := api.Get(bzzhash) + reader, mimeType, status, err := api.Get(bzzhash, true) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/swarm/api/filesystem_test.go b/swarm/api/filesystem_test.go index 174d8833a1..e0bb8915a9 100644 --- a/swarm/api/filesystem_test.go +++ b/swarm/api/filesystem_test.go @@ -58,7 +58,7 @@ func TestApiDirUpload0(t *testing.T) { resp = testGet(t, api, bzzhash+"/img/logo.png") exp = expResponse(content, "image/png", 0) - _, _, _, err = api.Get(bzzhash) + _, _, _, err = api.Get(bzzhash, true) if err == nil { t.Fatalf("expected error: %v", err) } @@ -91,17 +91,17 @@ func TestApiDirUploadModify(t *testing.T) { return } - bzzhash, err = api.Modify(bzzhash, "index.html", "", "") + bzzhash, err = api.Modify(bzzhash+"/index.html", "", "", true) if err != nil { t.Errorf("unexpected error: %v", err) return } - bzzhash, err = api.Modify(bzzhash, "index2.html", "9ea1f60ebd80786d6005f6b256376bdb494a82496cd86fe8c307cdfb23c99e71", "text/html; charset=utf-8") + bzzhash, err = api.Modify(bzzhash+"/index2.html", "9ea1f60ebd80786d6005f6b256376bdb494a82496cd86fe8c307cdfb23c99e71", "text/html; charset=utf-8", true) if err != nil { t.Errorf("unexpected error: %v", err) return } - bzzhash, err = api.Modify(bzzhash, "img/logo.png", "9ea1f60ebd80786d6005f6b256376bdb494a82496cd86fe8c307cdfb23c99e71", "text/html; charset=utf-8") + bzzhash, err = api.Modify(bzzhash+"/img/logo.png", "9ea1f60ebd80786d6005f6b256376bdb494a82496cd86fe8c307cdfb23c99e71", "text/html; charset=utf-8", true) if err != nil { t.Errorf("unexpected error: %v", err) return @@ -120,7 +120,7 @@ func TestApiDirUploadModify(t *testing.T) { resp = testGet(t, api, bzzhash+"/index.css") exp = expResponse(content, "text/css", 0) - _, _, _, err = api.Get(bzzhash) + _, _, _, err = api.Get(bzzhash, true) if err == nil { t.Errorf("expected error: %v", err) }