smithfarm / dochazka-rest

Dochazka REST server
Other
1 stars 3 forks source link

build/ops: create and use local state dir in Travis CI #98

Closed smithfarm closed 8 years ago

smithfarm commented 8 years ago

Signed-off-by: Nathan Cutler ncutler@suse.com

tampakrap commented 8 years ago

it still says 'OUCH!!! DOCHAZKA_STATE_DIR {HOME}/state is not readable by me!

smithfarm commented 8 years ago

it still says 'OUCH!!! DOCHAZKA_STATE_DIR {HOME}/state is not readable by me!

Yes, fixing that now.

tampakrap commented 8 years ago

ah not ready yet sorry

smithfarm commented 8 years ago

Yeah, I didn't have the quoting right in this line:

sudo sh -c "echo \"set( 'DOCHAZKA_STATE_DIR', \"$ENV{HOME}/state\" );\" >> /etc/dochazka-rest/REST_SiteConfig.pm"

and as a result $ENV was getting evaluated by bash, which replaced it with the empty string.

smithfarm commented 8 years ago

And now the problem is that, in the latest code, employee objects have a "sync" property but Common hasn't been updated yet. On it.

smithfarm commented 8 years ago

The Travis CI will not pass until CPAN updates to App::Dochazka::Common 0.205 (I submitted it just now).

tampakrap commented 8 years ago

tests still fail https://travis-ci.org/smithfarm/dochazka-rest/builds/159806646

smithfarm commented 8 years ago

test this please

smithfarm commented 8 years ago

This looks like an environmental issue in Travis CI. The BAILOUT is not coming from the REST code.

smithfarm commented 8 years ago

Actually, maybe I'm wrong about that.

smithfarm commented 8 years ago

I found the BAIL_OUT(0) call that is triggering the failure, and added a commit to expose more information on the cause.

smithfarm commented 8 years ago

The problem is/was that auditing was active, but the postgresql.conf file in Travis CI environment does not have the dochazka.eid = -1 line.

smithfarm commented 8 years ago
All tests successful.
Files=43, Tests=10549, 51 wallclock secs ( 2.02 usr  0.30 sys + 44.52 cusr  3.32 csys = 50.16 CPU)
Result: PASS