Print

Print


Hi K-T,

the API use is not too broad but it involves SQL queries. One could 
build very basic mock which basically ignores all input data and 
always returns success but that is not to useful for testing actual 
behavior. Building useful mock is a lot of work and I hope that we
could use sqlite as a mock for mysql for this purpose. That still 
may require a lot of effort because of differences in SQL support.

Anyway, this all is beyond the point, trouble for Jacek is that he
is now replacing db API completely. Even if we had a mock for testing
current code against "old" db API it would still continue to work OK
until someone updates mock itself to mimic new db API.

Cheers,
Andy


Kian-Tat Lim wrote on 2015-08-28:
> Andy,
> 
>> I doubt that we can write unit test for every single line of code
>> and every possible behavior. Standard problem with that code is
>> that for correct behavior it needs database instance (and bunch
>> of other things because it's Flask stuff) so it's hard to do it
>> with standalone setup.
> 
> 	The API or API usage is too large to build a maintainable mock
> (that would be a lot less than a SQLite implementation)?
>
š 

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1