From cf3b187bdef59078ba6570a2f5ee046ab87bcefd Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 7 Nov 2018 20:39:08 +0100 Subject: swarm, cmd/swarm: address ineffectual assignments (#18048) * swarm, cmd/swarm: address ineffectual assignments * swarm/network: remove unused vars from testHandshake * swarm/storage/feed: revert cursor changes --- cmd/swarm/access.go | 6 ++++++ cmd/swarm/fs_test.go | 3 +++ cmd/swarm/upload_test.go | 3 +-- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'cmd/swarm') diff --git a/cmd/swarm/access.go b/cmd/swarm/access.go index 629781edd..072541b65 100644 --- a/cmd/swarm/access.go +++ b/cmd/swarm/access.go @@ -114,6 +114,9 @@ func accessNewPass(ctx *cli.Context) { utils.Fatalf("error getting session key: %v", err) } m, err := api.GenerateAccessControlManifest(ctx, ref, accessKey, ae) + if err != nil { + utils.Fatalf("had an error generating the manifest: %v", err) + } if dryRun { err = printManifests(m, nil) if err != nil { @@ -147,6 +150,9 @@ func accessNewPK(ctx *cli.Context) { utils.Fatalf("error getting session key: %v", err) } m, err := api.GenerateAccessControlManifest(ctx, ref, sessionKey, ae) + if err != nil { + utils.Fatalf("had an error generating the manifest: %v", err) + } if dryRun { err = printManifests(m, nil) if err != nil { diff --git a/cmd/swarm/fs_test.go b/cmd/swarm/fs_test.go index 4f38b094b..3b722515e 100644 --- a/cmd/swarm/fs_test.go +++ b/cmd/swarm/fs_test.go @@ -80,6 +80,9 @@ func TestCLISwarmFs(t *testing.T) { t.Fatal(err) } dirPath2, err := createDirInDir(dirPath, "AnotherTestSubDir") + if err != nil { + t.Fatal(err) + } dummyContent := "somerandomtestcontentthatshouldbeasserted" dirs := []string{ diff --git a/cmd/swarm/upload_test.go b/cmd/swarm/upload_test.go index 0ac2456a5..ba4463e8b 100644 --- a/cmd/swarm/upload_test.go +++ b/cmd/swarm/upload_test.go @@ -243,8 +243,7 @@ func testCLISwarmUpRecursive(toEncrypt bool, t *testing.T) { } defer os.RemoveAll(tmpDownload) bzzLocator := "bzz:/" + hash - flagss := []string{} - flagss = []string{ + flagss := []string{ "--bzzapi", cluster.Nodes[0].URL, "down", "--recursive", -- cgit