aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMic Bowman2013-06-10 15:14:55 -0700
committerMic Bowman2013-06-10 15:14:55 -0700
commit82e3b9a6e0f0e1731df9080e4de63bc7c7079ec4 (patch)
treee1c961610be96de29c27c60a7456551a8cb8a3ae /OpenSim/Region/CoreModules
parentRemove Temporary from use to shortcut asset stores. The Local property (diff)
downloadopensim-SC_OLD-82e3b9a6e0f0e1731df9080e4de63bc7c7079ec4.zip
opensim-SC_OLD-82e3b9a6e0f0e1731df9080e4de63bc7c7079ec4.tar.gz
opensim-SC_OLD-82e3b9a6e0f0e1731df9080e4de63bc7c7079ec4.tar.bz2
opensim-SC_OLD-82e3b9a6e0f0e1731df9080e4de63bc7c7079ec4.tar.xz
Fix test for adding temporary assets. Code for non-local temporary assets
is there but commented out.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
index 1982473..7073433 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
@@ -93,7 +93,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
93 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector(); 93 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
94 lasc.Initialise(config); 94 lasc.Initialise(config);
95 95
96 // If it is local, it should not be stored
96 AssetBase a1 = AssetHelpers.CreateNotecardAsset(); 97 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
98 a1.Local = true;
97 a1.Temporary = true; 99 a1.Temporary = true;
98 100
99 lasc.Store(a1); 101 lasc.Store(a1);
@@ -102,6 +104,24 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
102 Assert.That(lasc.GetData(a1.ID), Is.Null); 104 Assert.That(lasc.GetData(a1.ID), Is.Null);
103 Assert.That(lasc.GetMetadata(a1.ID), Is.Null); 105 Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
104 106
107 // If it is remote, it should be stored
108 // AssetBase a2 = AssetHelpers.CreateNotecardAsset();
109 // a2.Local = false;
110 // a2.Temporary = true;
111
112 // lasc.Store(a2);
113
114 // AssetBase retreivedA2 = lasc.Get(a2.ID);
115 // Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
116 // Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
117 // Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
118
119 // AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
120 // Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
121
122 // byte[] retrievedA2Data = lasc.GetData(a2.ID);
123 // Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
124
105 // TODO: Add cache and check that this does receive a copy of the asset 125 // TODO: Add cache and check that this does receive a copy of the asset
106 } 126 }
107 127