mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 09:12:17 +00:00
trying filesystem elq for mono linux.
This commit is contained in:
parent
620dc2d086
commit
dfb02884a0
3 changed files with 2 additions and 16 deletions
|
@ -20,7 +20,7 @@ public class ObjectDatabaseFixture : ObjectDbTest
|
|||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
WithObjectDb();
|
||||
WithObjectDb(false);
|
||||
|
||||
testSeries = Builder<Series>
|
||||
.CreateNew()
|
||||
|
|
|
@ -22,13 +22,7 @@ public EloqueraDbFactory(EnvironmentProvider environmentProvider)
|
|||
|
||||
public EloqueraDb CreateMemoryDb()
|
||||
{
|
||||
if (EnvironmentProvider.IsMono)
|
||||
{
|
||||
return InternalCreate("server=(local);password=;options=inmemory", Guid.NewGuid().ToString());
|
||||
|
||||
}
|
||||
return InternalCreate("server=(local);password=;options=inmemory;uselocalpath=" + dllPath, Guid.NewGuid().ToString());
|
||||
|
||||
}
|
||||
|
||||
public EloqueraDb Create(string dbPath = null)
|
||||
|
@ -40,17 +34,9 @@ public EloqueraDb Create(string dbPath = null)
|
|||
|
||||
var file = new FileInfo(dbPath);
|
||||
|
||||
if (EnvironmentProvider.IsMono)
|
||||
{
|
||||
return InternalCreate(string.Format("server=(local);password=;usedatapath={0}", file.Directory.FullName), file.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
return InternalCreate(string.Format("server=(local);password=;usedatapath={0};uselocalpath={1}", file.Directory.FullName, dllPath), file.Name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private EloqueraDb InternalCreate(string connectionString, string databaseName)
|
||||
{
|
||||
var db = new DB(connectionString);
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue