Re: Test code is worth the space

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Test code is worth the space
Дата
Msg-id CANP8+jKe3t1PmTD-T_fOCpDeYGPCb9Zgm-SpgV6MNDBzXed0Pw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Test code is worth the space  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On 12 August 2015 at 03:10, Noah Misch <noah@leadboat.com> wrote:
 
> On another review I suggested we add a function to core to allow it to be
> used in regression tests. A long debate ensued, deciding that we must be
> consistent and put diagnostic functions in contrib. My understanding is
> that we are not allowed to write regression tests that use contrib modules,
> yet the consistent place to put diagnostic functions is contrib -
> therefore, we are never allowed to write tests utilizing diagnostic
> functions. We are allowed to put modules for testing in another directory,
> but these are not distributed to users so cannot be used for production
> diagnosis. Systemic fail, advice needed.

If you want a user-visible function for production diagnosis, set aside the
fact that you wish to use it in a test, and find the best place for it.  Then,
place the tests with the function.  (That is, if the function belongs in
contrib for other reasons, put tests calling it in the contrib module itself.)

Place non-user-visible test support functions in regress.c, or use one of the
options Robert described.

That helps, thanks. 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL, RAISE and error context
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Raising our compiler requirements for 9.6