diff --git a/bzz/api_test.go b/bzz/api_test.go index 7eea9abb51..a7bca204f1 100644 --- a/bzz/api_test.go +++ b/bzz/api_test.go @@ -122,6 +122,22 @@ func TestApiFileUpload(t *testing.T) { return } + content, err := ioutil.ReadFile(path.Join(testDir, "test0", "index.html")) + testGet(t, api, path.Join(bzzhash, "index.html"), content, "text/html", 0, 202) +} + +func TestApiFileUploadWithRootFile(t *testing.T) { + api, err := testApi() + if err != nil { + t.Errorf("unexpected error: %v", err) + return + } + bzzhash, err := api.Upload(path.Join(testDir, "test0", "index.html"), "index.html") + if err != nil { + t.Errorf("unexpected error: %v", err) + return + } + content, err := ioutil.ReadFile(path.Join(testDir, "test0", "index.html")) testGet(t, api, bzzhash, content, "text/html", 0, 202) }