canvas-lms/gems/canvas_panda_pub/test.sh

16 lines
240 B
Bash
Raw Normal View History

pandapub: add plugin settings, a simple client, and add to INST Adds a PandaPub client and settings UI. This commit doesn't add any new functionality or feature that use PandaPub - just the plumbing. running and configuring PandaPub: * Start up a local PandaPub instance. Easiest way is with Docker: docker run --rm -ti -p 49000:3000 -e ADMIN_USERNAME=admin \ -e ADMIN_PASSWORD=password zwily/pandapub:latest * Log into PandaPub at: http://$(boot2docker ip 2>/dev/null):49000/admin with admin/password. * Create a new application named "canvas" * Create a new key with an expiration date in the future. Record the key_id and secret. * Log into Canvas and go to PandaPub plugin settings: base_url: http://{DOCKER IP}:49000/ application_id: <id from created application> key_id: <id from created key> key_secret: <secret from created key> * In your PandaPub admin section, open the "Console" tab for your created application. In the "Subscribe" section, enter "**" in the input box, and hit "Subscribe". This will show you the first 50 events that arrive for the canvas application you just created. test plan for settings: * Verify that the /plugins/pandapub settings page works, saving, disabling, etc. test plan for client via console: * Set up and configure PandaPub in Canvas * Open a Rails console * Run this command to post a pandapub message: CanvasPandaPub.post_update("/public/foo", {"a" => 1}) * Verify that the message showed up in your PandaPub console. Change-Id: Ifddcbd335293c2a29f532b1e5fd44c23c8b910c4 Reviewed-on: https://gerrit.instructure.com/40311 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com> QA-Review: Sean Lewis <slewis@instructure.com> Product-Review: Zach Wily <zach@instructure.com>
2014-09-06 05:06:10 +08:00
#!/bin/bash
result=0
echo "################ canvas_panda_pub ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result