mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
cac2729230
* Allow configuring postgres with environment variables (cherry picked from commit 8439df78fea25656a9a1275d2a2fe3f0df0528c7) * Fix process provider when environment variables alread exist [common] (cherry picked from commit 66e5b4025974e081c1406f01a860b1ac52949c22) * First bash at running integration tests on postgres (cherry picked from commit f950e80c7e4f9b088ec6a149386160eab83b61c3) * Postgres integration tests running as part of the build pipeline (cherry picked from commit 9ca8616f5098778e9b5e6ce09d2aa11224018fab) * Fixed: Register PostgresOptions when running in utility mode * fixup! * fixup! * fixup! * fixup! * fixup! Co-authored-by: ta264 <ta264@users.noreply.github.com> Co-authored-by: Qstick <qstick@gmail.com>
37 lines
889 B
C#
37 lines
889 B
C#
using System;
|
|
using System.Linq;
|
|
using Dapper;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.Datastore;
|
|
using NzbDrone.Core.Indexers;
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
namespace NzbDrone.Core.Test.Datastore
|
|
{
|
|
public class DatabaseFixture : DbTest
|
|
{
|
|
[Test]
|
|
public void SingleOrDefault_should_return_null_on_empty_db()
|
|
{
|
|
Mocker.Resolve<IDatabase>()
|
|
.OpenConnection().Query<IndexerDefinition>("SELECT * FROM \"Indexers\"")
|
|
.SingleOrDefault()
|
|
.Should()
|
|
.BeNull();
|
|
}
|
|
|
|
[Test]
|
|
public void vacuum()
|
|
{
|
|
Mocker.Resolve<IDatabase>().Vacuum();
|
|
}
|
|
|
|
[Test]
|
|
public void get_version()
|
|
{
|
|
Mocker.Resolve<IDatabase>().Version.Should().BeGreaterThan(new Version("3.0.0"));
|
|
}
|
|
}
|
|
}
|