Revision cfed7823 trunk/Pithos.Core.Test/NetworkAgentTest.cs
b/trunk/Pithos.Core.Test/NetworkAgentTest.cs | ||
---|---|---|
27 | 27 |
} |
28 | 28 |
}; |
29 | 29 |
|
30 |
agent.CloudClient.Authenticate("890329@vho.grnet.gr", "24989dce4e0fcb072f8cb60c8922be19"); |
|
30 |
var account = "890329@vho.grnet.gr"; |
|
31 |
agent.CloudClient.Authenticate(account, "24989dce4e0fcb072f8cb60c8922be19"); |
|
31 | 32 |
|
32 | 33 |
var fileName = "012345.dump"; |
33 | 34 |
var filePath = Path.Combine(@"e:\pithos\", fileName); |
... | ... | |
46 | 47 |
} |
47 | 48 |
|
48 | 49 |
|
49 |
agent.CloudClient.DeleteObject(agent.PithosContainer, fileName);
|
|
50 |
agent.CloudClient.DeleteObject(null, agent.PithosContainer, fileName,agent.TrashContainer);
|
|
50 | 51 |
|
51 | 52 |
var task = Signature.CalculateTreeHashAsync(filePath, agent.BlockSize, agent.BlockHash); |
52 |
agent.UploadWithHashMap(new FileInfo(filePath),fileName,task); |
|
53 |
agent.UploadWithHashMap(account,"pithos",new FileInfo(filePath),fileName,task);
|
|
53 | 54 |
|
54 |
var newHash = agent.CloudClient.GetHashMap(agent.PithosContainer, fileName).Result; |
|
55 |
var newHash = agent.CloudClient.GetHashMap(null, agent.PithosContainer, fileName).Result;
|
|
55 | 56 |
|
56 | 57 |
|
57 | 58 |
var treeHash = task.Result; |
... | ... | |
79 | 80 |
FileAgent=fileAgent |
80 | 81 |
}; |
81 | 82 |
|
82 |
agent.CloudClient.Authenticate("890329@vho.grnet.gr", "24989dce4e0fcb072f8cb60c8922be19"); |
|
83 |
var account = "890329@vho.grnet.gr"; |
|
84 |
agent.CloudClient.Authenticate(account, "24989dce4e0fcb072f8cb60c8922be19"); |
|
83 | 85 |
|
84 | 86 |
var fileName = @"AccessDatabaseEngine_x64.exe"; |
85 | 87 |
|
... | ... | |
87 | 89 |
if (File.Exists(filePath)) |
88 | 90 |
File.Delete(filePath); |
89 | 91 |
|
90 |
var newHash = agent.CloudClient.GetHashMap(agent.PithosContainer, fileName).Result; |
|
91 |
agent.DownloadWithBlocks(agent.PithosContainer,new Uri(fileName,UriKind.Relative),filePath,newHash) |
|
92 |
var newHash = agent.CloudClient.GetHashMap(null, agent.PithosContainer, fileName).Result;
|
|
93 |
agent.DownloadWithBlocks(account,agent.PithosContainer,new Uri(fileName,UriKind.Relative),filePath,newHash)
|
|
92 | 94 |
.Wait(); |
93 | 95 |
|
94 | 96 |
Assert.IsTrue(File.Exists(filePath)); |
Also available in: Unified diff