Coder Social home page Coder Social logo

Comments (8)

dhershman1 avatar dhershman1 commented on June 26, 2024 1

Thanks for the report!

I'm super sorry for the late reply. Work was hectic!

I'll start digging into this soon as I can.

from tap-junit.

villelahdenvuo avatar villelahdenvuo commented on June 26, 2024

No worries, meanwhile I can use a workaround to report without failing the CI:

pg_prove --ext .sql -v test | tee out.tap
cat out.tap | npx tap-junit -o junit || true
grep -q 'All tests successful' out.tap

from tap-junit.

dhershman1 avatar dhershman1 commented on June 26, 2024

@villelahdenvuo So, is that 4th ok at the end always there? The problem is that the parser is reading that as a 4th test, which I'm assuming it shouldn't be because it looks like the test count is 3.

If so, I'll have to think up a snazzy method to counter this problem since I can't just mark empty oks to be ignored.

from tap-junit.

villelahdenvuo avatar villelahdenvuo commented on June 26, 2024

@dhershman1 Seems like pgTAP always add the final ok. Maybe a CLI option to allow a final empty ok?

Edit: Looks like pg_prove actually prints the extra ok as it's supposed to print filename.....ok but the test results get in the middle. I will see if I can fix it with some arguments.

from tap-junit.

dhershman1 avatar dhershman1 commented on June 26, 2024

If it printed off the filename...ok I think you'd be good, that is causing a miscount of your tests, tap thinks you have 4 tests and is only expecting 3.

from tap-junit.

villelahdenvuo avatar villelahdenvuo commented on June 26, 2024
t/group.sql ....... ok     
t/logging.sql ..... ok     
t/rls_admin.sql ... ok     
t/rls_normal.sql .. ok     
t/security.sql .... ok   
t/service.sql ..... ok   
t/user.sql ........ ok     
t/utils.sql ....... ok   
All tests successful.

This is the output without --verbose and here it is with --verbose:

...
ok 23 - find_user_by_email_in_user_pools should find user in multiple user pools
ok
t/utils.sql ....... 
1..3
ok 1 - slugify function test 1
ok 2 - slugify function test 2
ok 3 - slugify function test 3
ok
All tests successful.

So the problem indeed is in the output format of pg_prove. I didn't find any command line option for it to not output extra ok for each file. I guess I will just keep my workaround. You can close this issue if you want.

from tap-junit.

dhershman1 avatar dhershman1 commented on June 26, 2024

Though it may be against convention, I can see about adding an option like --expect-hanging-ok or something to account for this.

It may not be great but the more outputs tap-junit can support the more helpful it can be!

from tap-junit.

villelahdenvuo avatar villelahdenvuo commented on June 26, 2024

If you can implement something like that it would be great, but the workaround has been working fine so it's not a big issue for us. Thanks for everything!

from tap-junit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.