From 3fa3dcdbd9380e39be4c81acfc62df8b5afe7eca Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Fri, 10 Aug 2018 10:23:51 +0200 Subject: [PATCH] cmd/swarm: check encrypted uploads in manifest update tests --- cmd/swarm/manifest_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/swarm/manifest_test.go b/cmd/swarm/manifest_test.go index 43e8fc2414..08fe0b2eb7 100644 --- a/cmd/swarm/manifest_test.go +++ b/cmd/swarm/manifest_test.go @@ -271,12 +271,7 @@ func testManifestChange(t *testing.T, encrypt bool) { checkFile(t, client, newManifestHash, "index.html", indexData) // check default entry change - // TODO: encrypted uploads generate manifest with default entry - // with different hash compared to the same file that is used - // for default entry. - if !encrypt { - checkFile(t, client, newManifestHash, "", indexData) - } + checkFile(t, client, newManifestHash, "", indexData) }) // upload a new file and use its manifest to change the file it the original manifest, @@ -404,12 +399,17 @@ func testManifestChange(t *testing.T, encrypt bool) { // TestNestedDefaultEntryUpdate tests if the default entry is updated // if the file in nested manifest used for it is also updated. -// TODO: create a similar test for encrypted uploads when it becomes -// functional. func TestNestedDefaultEntryUpdate(t *testing.T) { testNestedDefaultEntryUpdate(t, false) } +// TestNestedDefaultEntryUpdateEncrypted tests if the default entry +// of encrypted upload is updated if the file in nested manifest +// used for it is also updated. +func TestNestedDefaultEntryUpdateEncrypted(t *testing.T) { + testNestedDefaultEntryUpdate(t, true) +} + func testNestedDefaultEntryUpdate(t *testing.T, encrypt bool) { t.Parallel() cluster := newTestCluster(t, 1)