clickhouse_fdw icon indicating copy to clipboard operation
clickhouse_fdw copied to clipboard

How to add test cases

Open tkosgrabar opened this issue 2 years ago • 3 comments

Hi,

I am trying to add few tests for usecase that I have, but failes. Then I tried also to add sample test, but still I cann't manage to pass tests ( locally and with ci ).

Can you check maybe

  • https://github.com/ildus/clickhouse_fdw/compare/master...tkosgrabar:clickhouse_fdw:sample?expand=1
  • https://github.com/tkosgrabar/clickhouse_fdw/actions/runs/4049384085/jobs/6965679447

Thanks in advance

tkosgrabar avatar Jan 31 '23 00:01 tkosgrabar

Hi, try take a look at #88

Denchick avatar Jan 31 '23 07:01 Denchick

HI, sorry, but I don't see tests in #88 I understand that to test functions cases should be added to functions.sql and they are validated buy comparing with functions.out and functions_1.out.

What I do not get is why test from sample branch fails ...

tkosgrabar avatar Feb 07 '23 11:02 tkosgrabar

Yes, for tests you need add sql queries to .sql, and the expected result to corresponding .out files. If the result is different for another pg version, then you could add also to correspoding _1.out file. The tests are implememented using docker, you could run them locally then the output will show what's going wrong in your case. In github actions file you can see the exact commands to run.

ildus avatar Feb 15 '23 09:02 ildus