aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexRa2010-04-27 09:53:01 +0300
committerAlexRa2010-05-19 21:50:34 +0300
commitd6a6668bd7230099b18e1c45556160fc36bcce8d (patch)
tree25cd6ff3b1cd99b590bcc78545e7ce869fb44450
parentMySQLAssetData.cs now supports asset_flags, CreatorID (diff)
downloadopensim-SC-d6a6668bd7230099b18e1c45556160fc36bcce8d.zip
opensim-SC-d6a6668bd7230099b18e1c45556160fc36bcce8d.tar.gz
opensim-SC-d6a6668bd7230099b18e1c45556160fc36bcce8d.tar.bz2
opensim-SC-d6a6668bd7230099b18e1c45556160fc36bcce8d.tar.xz
Scrambled asset type in BasicAssetTest.cs!
The asset type wasn't in the list of "DontScramble" fields, so the test assets were stored with randomized type, which caused exception on reading them. Also the scrambler was moved from local var to the class level, so it could be used in the new tests I've added (see the next commit).
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs
index e80cff9..cd6903b 100644
--- a/OpenSim/Data/Tests/BasicAssetTest.cs
+++ b/OpenSim/Data/Tests/BasicAssetTest.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Data.Tests
43 public UUID uuid2; 43 public UUID uuid2;
44 public UUID uuid3; 44 public UUID uuid3;
45 public byte[] asset1; 45 public byte[] asset1;
46 PropertyScrambler<AssetBase> scrambler;
46 47
47 public void SuperInit() 48 public void SuperInit()
48 { 49 {
@@ -53,6 +54,15 @@ namespace OpenSim.Data.Tests
53 uuid3 = UUID.Random(); 54 uuid3 = UUID.Random();
54 asset1 = new byte[100]; 55 asset1 = new byte[100];
55 asset1.Initialize(); 56 asset1.Initialize();
57
58 scrambler = new PropertyScrambler<AssetBase>()
59 .DontScramble(x => x.ID)
60 .DontScramble(x => x.FullID)
61 .DontScramble(x => x.Metadata.ID)
62 .DontScramble(x => x.Metadata.Type)
63 .DontScramble(x => x.Metadata.CreatorID)
64 .DontScramble(x => x.Metadata.ContentType)
65 .DontScramble(x => x.Metadata.FullID);
56 } 66 }
57 67
58 [Test] 68 [Test]
@@ -73,15 +83,6 @@ namespace OpenSim.Data.Tests
73 a2.Data = asset1; 83 a2.Data = asset1;
74 a3.Data = asset1; 84 a3.Data = asset1;
75 85
76 PropertyScrambler<AssetBase> scrambler = new PropertyScrambler<AssetBase>()
77 .DontScramble(x => x.Data)
78 .DontScramble(x => x.ID)
79 .DontScramble(x => x.FullID)
80 .DontScramble(x => x.Metadata.ID)
81 .DontScramble(x => x.Metadata.CreatorID)
82 .DontScramble(x => x.Metadata.ContentType)
83 .DontScramble(x => x.Metadata.FullID);
84
85 scrambler.Scramble(a1); 86 scrambler.Scramble(a1);
86 scrambler.Scramble(a2); 87 scrambler.Scramble(a2);
87 scrambler.Scramble(a3); 88 scrambler.Scramble(a3);