Skip to content

Commit dc9b565

Browse files
committed
fixeS
1 parent 28c5ce5 commit dc9b565

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

tests/cli_tests/zboxcli_download_dir_test.go

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ func TestDownloadDir(testSetup *testing.T) {
2828

2929
// Success Scenarios
3030
t.Run("Download Directory from Root Directory Should Work", func(t *test.SystemTest) {
31-
allocSize := int64(2048)
3231
filesize := int64(256)
3332
remotepath := "/dir1"
3433

35-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
36-
"size": allocSize,
37-
})
34+
allocationID := setupAllocation(t, configPath)
3835

3936
filename := generateFileAndUpload(t, allocationID, remotepath, filesize)
4037

@@ -51,13 +48,10 @@ func TestDownloadDir(testSetup *testing.T) {
5148
})
5249

5350
t.RunWithTimeout("Download Directory Concurrently Should Work for two Different Directory", 6*time.Minute, func(t *test.SystemTest) {
54-
allocSize := int64(4096)
5551
filesize := int64(1024)
5652
remoteFilePaths := [2]string{"/dir1/", "/dir2/"}
5753

58-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
59-
"size": allocSize,
60-
})
54+
allocationID := setupAllocation(t, configPath)
6155

6256
fileNameOfFirstDirectory := generateFileAndUpload(t, allocationID, remoteFilePaths[0], filesize)
6357
fileNameOfSecondDirectory := generateFileAndUpload(t, allocationID, remoteFilePaths[1], filesize)
@@ -95,13 +89,10 @@ func TestDownloadDir(testSetup *testing.T) {
9589
})
9690

9791
t.Run("Download Directory from a Directory Should Work", func(t *test.SystemTest) {
98-
allocSize := int64(2048)
9992
filesize := int64(256)
10093
remotepath := "/dir/dir1"
10194

102-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
103-
"size": allocSize,
104-
})
95+
allocationID := setupAllocation(t, configPath)
10596

10697
filename := generateFileAndUpload(t, allocationID, remotepath, filesize)
10798

@@ -118,13 +109,10 @@ func TestDownloadDir(testSetup *testing.T) {
118109
})
119110

120111
t.Run("Download Directory from Nested Directory Should Work", func(t *test.SystemTest) {
121-
allocSize := int64(2048)
122112
filesize := int64(256)
123113
remotepath := "/nested/dir/"
124114

125-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
126-
"size": allocSize,
127-
})
115+
allocationID := setupAllocation(t, configPath)
128116

129117
filename := generateFileAndUpload(t, allocationID, remotepath, filesize)
130118

@@ -141,13 +129,10 @@ func TestDownloadDir(testSetup *testing.T) {
141129
})
142130

143131
t.RunWithTimeout("Download Entire Directory Should Work but does not see blobber/issues/588", 3*time.Minute, func(t *test.SystemTest) { // todo: slow
144-
allocSize := int64(2048)
145132
filesize := int64(256)
146133
remotepath := "/nested/dir/"
147134

148-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
149-
"size": allocSize,
150-
})
135+
allocationID := setupAllocation(t, configPath)
151136

152137
filename := generateFileAndUpload(t, allocationID, remotepath, filesize)
153138

@@ -171,9 +156,7 @@ func TestDownloadDir(testSetup *testing.T) {
171156

172157
// This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file
173158
t.Run("Share Entire Folder from Another Wallet", func(t *test.SystemTest) {
174-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
175-
"size": 10 * 1024,
176-
})
159+
allocationID := setupAllocation(t, configPath)
177160
filename = generateFileAndUpload(t, allocationID, remotepath, filesize)
178161
require.NotEqual(t, "", filename)
179162
// Delete the uploaded file from tmp folder if it exist,
@@ -250,13 +233,10 @@ func TestDownloadDir(testSetup *testing.T) {
250233
})
251234

252235
t.RunWithTimeout("Download Directory having Encrypted files Should Work", 5*time.Minute, func(t *test.SystemTest) {
253-
allocSize := int64(10 * MB)
254236
filesize := int64(10)
255237
remotepath := "/dirx"
256238

257-
allocationID := setupAllocation(t, configPath, map[string]interface{}{
258-
"size": allocSize,
259-
})
239+
allocationID := setupAllocation(t, configPath)
260240

261241
filename := generateRandomTestFileName(t)
262242
err := createFileWithSize(filename, filesize)

0 commit comments

Comments
 (0)