Skip to content

PostgresExtensionTestOptions

Namespace: Ankus.Testing

Assembly: Ankus.Testing.dll

Selects the extension publication and isolated PostgreSQL environment owned by a test fixture.

public sealed class PostgresExtensionTestOptions

Inheritance: object

public PostgresExtensionTestOptions()

Gets literal MSBuild properties used for project selection and native publication. The default contains the effective selection and properties forwarded through ankus test, or an empty collection for direct fixture invocation.

public IReadOnlyDictionary<string, string> BuildProperties { get; init; }

Value: IReadOnlyDictionary<string, string>

Gets the MSBuild configuration used to publish the extension. The default is the ankus test command’s configuration when invoked through that command, and Release otherwise.

public string Configuration { get; init; }

Value: string

Gets the parent for isolated cluster data, or null for the system temporary directory. Only the fixture’s unique child directory is removed. The ankus test command controls this location with –pgdata.

public string? DataDirectoryBase { get; init; }

Value: string

Gets whether the publication includes PgTest native entry points and SQL. The default is false.

public bool IncludeTests { get; init; }

Value: bool

Gets the selected PostgreSQL installation, or null for ordinary fixture discovery.

public PostgresInstallation? Installation { get; init; }

Value: PostgresInstallation

Gets an exact requested TCP port, or null for automatic reservation.

public int? Port { get; init; }

Value: int?

Gets additional postgresql.conf lines for the isolated cluster.

public IReadOnlyList<string> PostgreSqlConfiguration { get; init; }

Value: IReadOnlyList<string>

Gets the extension project to publish.

public required string ProjectPath { get; init; }

Value: string

Gets whether to reuse the last successful schema for this build while recompiling native code. The default follows ankus test –no-schema, or false for ordinary fixture invocation. Reuse requires unchanged native declarations and a previous successful publication for the same target and test mode.

public bool ReuseSchema { get; init; }

Value: bool

Gets whether to load the extension during shared preload before any test backends start.

public bool SharedPreload { get; init; }

Value: bool

Gets whether the test server runs under Valgrind’s Memcheck tool, as pgrx’s USE_VALGRIND does.

public bool UseValgrind { get; init; }

Value: bool

ankus test –valgrind enables it for every fixture in the run. See UseValgrind.