-
Notifications
You must be signed in to change notification settings - Fork 5
/
Tests How-to.txt
30 lines (21 loc) · 2.02 KB
/
Tests How-to.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- How to execute the tests in this project:
1. Copy the DataProviders.json file to UserDataProviders.json in "Tests" folder and enable the providers to be tested (defaults are v7.4 AccessClient and v7.4 ODBC)
2. Replace {HOST}, {USER}, {PASSWORD}, {LIBRARY_LIST} and {DEFAULT_SCHEMA} with your own values. Don't worry about commiting this file is excluded in git
3. If you are going to run GAS and non GAS tests at the same time you have to use different schemas for each set
4. You can disable any of the providers in the NET472 and CORE31 Providers sections at the bottom of the file.
- How to maintain the tests from upstream
The tests have been set up in a way that tests from upstream can be simply copied over. You have to copy only the source code files and not the project files as follows:
- Copy all code (e.g. exclude \bin, \obj and .csproj file) from:
Tests\Base (except CustomizationSupport folder)
Tests\Linq (except Custom folder)
Tests\FSharp
Tests\VisualBasic
Tests\Model
It's best to delete the existing code and then copy the new one over in case any files have been deleted from upstream
- Add or update dependencies in /Build/*.props files as neeeded. Directory.Packages.props can be safely copied - just make sure the linq2db libs are added to the target version.
- Tweaks to test SQL setup files in Data\Create Scripts\ might be needed
This project was setup to run all DB2 tests. But sometimes tests that target DB2 are not valid for DB2i. All customization is performed in Tests\Base\CustomizationSupport\Db2iInterceptor.cs. You can intercept any test method there and return any valid DB2i providers for that specific test. If no providers are returned the test is ommited altogether. An DB2i specfic tests should be placed in the Tests\Linq\Custom folder.
For all tests to run properly journaling needs to be enabled on the liblists used (replace text in curly brackets):
CRTJRNRCV JRNRCV({JOURNAL RECEIVER NAME})
CRTJRN JRN({JOURNAL NAME}) JRNRCV({JOURNAL RECEIVER NAME})
STRJRNLIB LIB({LIBRARY NAME}) JRN({JOURNAL NAME})