mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
cmd/swarm: check encrypted uploads in manifest update tests
This commit is contained in:
parent
74815b387d
commit
3fa3dcdbd9
1 changed files with 8 additions and 8 deletions
|
|
@ -271,12 +271,7 @@ func testManifestChange(t *testing.T, encrypt bool) {
|
||||||
checkFile(t, client, newManifestHash, "index.html", indexData)
|
checkFile(t, client, newManifestHash, "index.html", indexData)
|
||||||
|
|
||||||
// check default entry change
|
// check default entry change
|
||||||
// TODO: encrypted uploads generate manifest with default entry
|
checkFile(t, client, newManifestHash, "", indexData)
|
||||||
// with different hash compared to the same file that is used
|
|
||||||
// for default entry.
|
|
||||||
if !encrypt {
|
|
||||||
checkFile(t, client, newManifestHash, "", indexData)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// upload a new file and use its manifest to change the file it the original manifest,
|
// 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
|
// TestNestedDefaultEntryUpdate tests if the default entry is updated
|
||||||
// if the file in nested manifest used for it is also 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) {
|
func TestNestedDefaultEntryUpdate(t *testing.T) {
|
||||||
testNestedDefaultEntryUpdate(t, false)
|
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) {
|
func testNestedDefaultEntryUpdate(t *testing.T, encrypt bool) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
cluster := newTestCluster(t, 1)
|
cluster := newTestCluster(t, 1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue