jbogard / Respawn

Intelligent database cleaner for integration tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use TablesToIgnore?

CelineVc opened this issue · comments

I'm trying to use Respawn in our IntegrationTests.
I only need one table to be ignored. The rest can be wiped.

These are my checkpoint settings:

private static Checkpoint checkpointProduction = new Checkpoint()
            {
                DbAdapter = DbAdapter.SqlServer,
                TablesToIgnore = new string[] { "MaterialTypes" },
            };

When I start the tests everything is wiped, including the table in TablesToIgnore.
Am I doing something wrong, or didn't I understand the workings of TablesToIgnore?

Extra info:
[Production].[dbo].[MaterialTypes] is the complete name of the table.
I tried dbo.MaterialTypes, MaterialTypes, Production.dbo.MaterialTypes, [Production].[dbo].[MaterialTypes] and several other possibilities. It was always wiped.

Kind regards

It works!
The connectionstrings of the databases were swapped, so I was configuring the wrong database.