Commit Graph

143 Commits (3ab22b201529d029482033aba3ddd2876657c72f)

Author SHA1 Message Date
Justin Clark-Casey (justincc) f13f35755c comment out obsolete assert that 'item has been passed to another user since it was last set' perms flag was set when a prim item was added to a scene object 2010-07-14 11:08:54 -07:00
Justin Clark-Casey (justincc) 5c322335e5 add sqlite database back to database tests
this appears to be okay even though we reuse it between runs without deleting it first.
size of the database appears not to be changing though that could be deceptive
2010-06-04 18:27:16 +01:00
AlexRa 5d65ef2db3 Minor correction to AssetTests.cs
(forgot to change test descriptions, has no effect on running the tests)
2010-05-26 10:25:56 +03:00
AlexRa 57f4729eea Ensured that tests are skipped for wrong conn string, also m_log chng
The base test class now tries to connect to DB, ignores all tests in the
class if unable to.

Also m_log changed to instance field (which in this case shouldn't cause
any problems),  to avoid having to define it separately in each derived
class.  Here I touched things that I don't understand well (using log4net),
so please review this commit.
2010-05-23 12:46:33 +03:00
AlexRa 89b7c64b6f Various minor changes in the data tests 2010-05-23 11:48:22 +03:00
AlexRa 2537acc04d Unitests: Asset, Estate, Region (the "legacy" one), Inventory
The tests have been modified to work under NUnit 2.4.6
(the one currently used in the project).

They will also work with NUnit 2.5+ as is, but will look better
if you #define NUNIT25 for them.
2010-05-23 11:48:10 +03:00
AlexRa 330ad501a5 Added MS SQL test conn to INI - only as an example, modify before use!!!
NOTE that this INI file is currently loaded as a embedded RESOURCE, which is weird and has a
disadvantage of having to rebuild the Tests whenever the conn strings are changed.
The only reason is that I couldn't figure out a reliable way to put this INI into the correct
dir at runtime. If somebody can do it, that would be cool.
2010-05-23 11:48:08 +03:00
AlexRa b1e6e99506 BasicAssetTest.cs replaced by AssetTests.cs
AssetTests: The name has changed to reflect the fact it is no longer a base class,
but the complete asset test for all supported databases.

The test can also check storing of CreatorID, but the feature is
disabled at this commit!
2010-05-23 11:48:02 +03:00
AlexRa 749cf0f6eb Bugfix in tests (must clear db before migrations, not after) 2010-05-23 11:47:59 +03:00
AlexRa f527584ed3 EstateData tests passing on all DBs 2010-05-23 11:47:56 +03:00
AlexRa 94f4c20866 Corrections in RegionTests.cs. It now fully works!
The problem was that some tests relied on prior tests
to leave the DB in a particular state, but the test class
cleared the DB every time. The affected tests have been
merged into one to remove the dependencies.

tested on all 3 Dbs, all tests green.
2010-05-23 11:47:54 +03:00
AlexRa 6322a085b3 Minor corrections in BasicDataServiceTest.cs
(added more functions for cleaning up DB from the
derived tests)
2010-05-23 11:47:51 +03:00
AlexRa 7f70ae0ebd All data tests made DBMS-independent 2010-05-23 11:47:39 +03:00
AlexRa 91ad1f4ee7 Added generic base classes for testing database services
These are some generic classes that simplify writing tests
for any of the data connectors and databases. Among other
things, configuring the connection strings is done once,
in a separate resource file.

Tests based on the new BasicDataServiceTest class require
NUnit 2.5 or better.
2010-05-23 11:47:36 +03:00
AlexRa ce787a4c41 Series of patches to include creator ID in assets.
Contains a migration.

SQLite: May contain nuts.

The SQLite migration copies the entire asset table. Be prepared for quite a wait. Don't interrupt it. Back up your assets db.

BasicAssetTest checks CreatorID storage, new test for weird CreatorID

(now also checks that non-GUID or empty CreatorID gets stored correctly)

Signed-off-by: Melanie <melanie@t-data.com>
2010-05-20 11:01:51 +01:00
AlexRa d6a6668bd7 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).
2010-05-19 21:50:34 +03:00
Justin Clark-Casey (justincc) cc67de5b86 rename SQLiteNG to SQLite and SQLite to SQLiteLegacy
this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was SQLiteNG
MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if using standalone)
See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details
This commit also temporarily changes unsigned ParentEstateID values in the OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies).  And change data columns in sqlite is a pita.
2010-04-30 17:45:00 +01:00
Melanie 70b0e07d1e Remove the reading of estate_settings.xml and the associated processing of
defaults. Adding code to facilitate estate creation / managemment as part of
first time start up
2010-03-22 18:49:56 +00:00
Diva Canto 763285aaf1 Fixed SQL tests. 2010-03-02 07:29:41 -08:00
John Hurliman df76e95aa2 Changed asset CreatorID to a string 2010-02-22 14:18:59 -08:00
John Hurliman 71c6559a91 Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim into presence-refactor 2010-02-22 14:10:19 -08:00
John Hurliman 7665aad002 * Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it 2010-02-22 13:27:17 -08:00
Melanie 1f45e6c649 Merge branch 'master' into presence-refactor
This brings presence-refactor up to master again
2010-02-22 03:00:59 +00:00
Diva Canto b92645ac56 MySQL tests pass, except T016_RandomSogWithSceneParts. Total mystery as to why that test doesn't show in panda. 2010-02-21 17:59:00 -08:00
Diva Canto bb171717ce Deleted obsolete files in the Data layer. Compiles. 2010-02-21 15:38:52 -08:00
Justin Clark-Casey (justincc) 4355bcc417 Disable Data.BasicRegioNTest.T016_RandomSogWithSceneParts() temporarily since it's making the tests fail but the cause is not obvious (wrapped up in layers of reflection) 2010-02-16 19:31:49 +00:00
Melanie 61f63fdc38 Put PassCollision on the ignore list for testing, since we don't save that
yet.
2009-12-31 23:51:53 +00:00
Kunnis 4c61fcfc40 Getting rid of the dead field RootInventoryFolderId on UserProfileData, It's not even stored in mysql.
Signed-off-by: Melanie <melanie@t-data.com>
2009-12-06 03:57:15 +00:00
Justin Clark-Casey (justincc) 0f745e928f Apply patch that fixes the failing T013_eStateSettingsRandomStorage test
See http://opensimulator.org/mantis/view.php?id=3993
Thanks Kunnis
2009-11-27 18:52:20 +00:00
Justin Clark-Casey (justincc) 73b437b7b4 minor: remove some mono compiler warnings 2009-11-12 18:30:32 +00:00
John Hurliman afef1ac191 Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen 2009-11-05 13:10:58 -08:00
John Hurliman fdce1be3db * Removed OpenSim.Data.NHibernate
* Replaced calls to ThreadPool.QueueUserWorkItem() with ThreadPool.UnsafeQueueUserWorkItem() since OpenSim does not use Code Access Security sandboxing
2009-10-19 16:52:27 -07:00
Jeff Ames 606e831ff5 Formatting cleanup. 2009-10-01 09:38:36 +09:00
Jeff Ames ee205e7e81 Formatting cleanup. 2009-10-01 01:17:47 +09:00
John Hurliman f42d085ab1 SceneObjectGroup cleanup. Removes the default constructor and unnecessary null checks on m_rootPart 2009-09-16 15:06:08 -07:00
Justin Clark-Casey (justincc) b061f2a3b0 oops, disable T012_EstateSettingsRandomStorage() again since it does appear to fail occasionally 2009-09-07 18:39:23 +01:00
Justin Clark-Casey (justincc) fc8efc1667 T012_EstateSettingsRandomStorage() which wasn't being run because the method was private
test appears to work, so method made public to run in tests
2009-09-06 22:09:19 +01:00
Kunnis b1853d9f26 Fixing a spot I missed in assets. Switching Grid to the new naming schema with Store/Get 2009-08-19 23:46:25 +01:00
Kunnis f1287cc7af * Switching IAssetData to follow the new naming schema, removing the separate insert and update methods. 2009-08-19 23:45:22 +01:00
Jeff Ames 82c888fc6c Add copyright headers. Formatting cleanup. Fix a compiler warning. 2009-08-17 10:29:06 +09:00
Kunnis dd78c250ae * Added Expression based ignores to the PropertyScrambler, which makes a lot of the tests clearer because I'm not constantly resetting properties. 2009-08-16 14:34:16 -04:00
Kunnis 5dde4a4cfa * More improvements to BasicAssetTest.cs 2009-08-16 14:26:43 -04:00
Kunnis d2e5380cb2 * Fixed MySQL/MySQLAssetData.cs to properly do updates * Removed an extra parameter from MySQL/MySQLInventoryData.cs * Fixed a bug in SQLite/SQLiteAssetData.cs that was causing a NRE when updating an asset. * Improved the BasicAssetTest.cs to do full create/update/get testing * Improved the BasicInventoryTest.cs to do full create/update/get of both a folder and an item * Moved the null ref tests to the start of the PropertyCompareConstraint.cs, so that it doesn't throw when passing in a null item 2009-08-16 14:17:29 -04:00
Kunnis f6251ce810 * Modified SQLite/SQLiteInventoryStore.cs to not throw if the inventory row does not exist, to match the mysql behavior. * Modified SQLite/SQLiteRegionData.cs to only persist temporary items following the same rules mysql uses. * Added another ignore to the inventory test that was missing. * Added a few more ignores to the RegionTest that the first version of my test were missing. * Added ignoring the root Folder ID, which is set by the inventory system. * Added several improvements to the PropertyCompareConstraint: Protection against infinite loops, added IComparable<T> (for UUID) and moved IComparable before the property matching. * Fixed a bug where I was saving the inside of the ignore expression instead of the outside of it. 2009-08-16 14:15:59 -04:00
Kunnis 23d478f2fa Adding in Reflection-based testing, to ensure that all properties are covered. 2009-08-16 13:35:44 -04:00
Jeff Ames 2b630470b0 Add copyright headers. Formatting cleanup. 2009-08-16 17:30:13 +09:00
Justin Clark-Casey (justincc) 31820b0026 minor formatting adjustments 2009-08-14 18:36:09 +01:00
Kunnis c18f7560d9 Adding in Reflection-based testing, to ensure that all properties are covered. 2009-08-14 18:15:25 +01:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Sean Dague 5ef6794165 make the asserts spit out messages about their test names 2009-04-13 21:04:50 +00:00