theory / tap-parser-sourcehandler-pgtap

TAP::Parser::SourceHandler::pgTAP
http://search.cpan.org/dist/TAP::Parser::SourceHandler::pgTAP
10 stars 13 forks source link

Can't locate object method "SELECT" via package "plan" (perhaps you forgot to load "plan"?) at #29

Open xenoterracide opened 4 years ago

xenoterracide commented 4 years ago

getting this error

Can't locate object method "SELECT" via package "plan" (perhaps you forgot to load "plan"?) at 

honestly, I think it's a red herring, I don't see how it could even be connecting to the database without the password.

pg_prove --host localhost --dbname mydb --ext sql --recurse
Status: Downloaded newer image for xenoterracide/pg_prove:latest
./root/.cpan/build/TAP-Parser-SourceHandler-pgTAP-3.35-0/t/bin/psql ...... 
No subtests run 
./root/.cpan/build/TAP-Parser-SourceHandler-pgTAP-3.35-0/t/scripts/psql .. 
No subtests run 
Can't locate object method "SELECT" via package "plan" (perhaps you forgot to load "plan"?) at ./t/can-connect.sql line 2.
./t/can-connect.sql ...................................................... 

copy and pasted from the documentation, this is can-connect.sql

BEGIN;
SELECT plan(1);

-- Run the tests.
SELECT pass( 'My test passed, w00t!' );

-- Finish the tests and clean up.
SELECT * FROM finish();
ROLLBACK;
theory commented 4 years ago

Sounds like it think your test files are Perl, as that's a Perl error, not a PostgreSQL error.

Also not really a pgTAP issue, but pg_prove.

xenoterracide commented 4 years ago

@theory oh pg_prove is a different repo? that repo name... tho... could move over there

theory commented 3 years ago

Does it still happen with the official Docker image?