Add functionality to FakeTable synonyms for remote tables/views#48
Add functionality to FakeTable synonyms for remote tables/views#48dkultasev wants to merge 0 commit intotSQLt-org:masterfrom
Conversation
|
@mbt1 I want to make tests to for remote synonyms testing. To make that happen I want to create the database and synonym inside the test. I can't create database within transaction, so I need to create it somehow before tests start and drop it when it finishes. Can you please suggest how to make that properly? |
|
I've added bunch of unit tests and want to add all FakeTable tests for remote synonyms. However I still have problem with the certificate. I needed to create database and store all needed DDL statements in the separate file as you can't create database within transaction. Do I need to clean it up after tests are finished/failed? There might be better approach. |
|
There are several ways to go about it:
If you think 3 is a good idea, let's talk before you implement anything. |
|
I think that 3 is a good idea and OK to implement it, however I think that it would easier to split that into 2 steps. First I'll go with the step 1 and finish synonyms stuff, then I can do it in a proper way with the new PR. I still have problems with local setup. I'm bad with certificates and it is always failing on the following tests: |
|
@mbt1 I've added UDDT support + copied and adjusted all FakeTable unit tests. What should I do now to finish up this request? |
|
@mbt1 I've finally resolved the issues with certificate locally. Should I proceed with the instructions in NewRelease.doc? |
The main idea of this functionality is to create views/wrappers that would point to the needed database's system views and use them instead of the own ones.
Currently only faking data is working (identity columns, default constrains and computed columns also). Foreign keys and other constraints that are added with
ApplyConstraintprocedure are not implemented.