Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block dave-shawley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dave-shawley on github.
  • I am daveshawley ( on keybase.
  • I have a public key whose fingerprint is E1B6 B144 A6D1 51F9 DD04 EFDA 2748 E69F 7CB1 DB19

To claim this, I am signing this object:

dave-shawley / service_functionality.bats
Created Nov 17, 2013
BATS integration tests for nginx proxy
View service_functionality.bats
@test "nginx proxies to devpi-server" {
HOST=$(hostname --fqdn)
wget -q -O$TMPFILE http://$HOST/root/pypi
grep 'type.*"indexconfig"' $TMPFILE
grep 'type.*"mirror"' $TMPFILE
dave-shawley / devpi-server
Last active Dec 28, 2015
nginx configuration for devpi-server
View devpi-server
# nginx proxy for devpi-server
upstream devpi {
server {
server_name <%= node.fqdn %>;
dave-shawley / service_configuration.bats
Created Nov 17, 2013
BATS integration tests for nginx
View service_configuration.bats
@test "devpi-server is enabled" {
test -e /etc/nginx/sites-available/devpi-server
test -L /etc/nginx/sites-enabled/devpi-server
dave-shawley / service_installation.bats
Last active Dec 28, 2015
BATS integration tests for an nginx recipe
View service_installation.bats
@test "nginx is installed" {
test -n "$(which nginx)"
@test "default site is disabled" {
test ! -e /etc/nginx/sites-enabled/default
dave-shawley / gist:5013968
Created Feb 22, 2013
Little helper function that runs a bunch of named tests back-to-back calling setUp() and tearDown() methods. Very useful for spot checking unit test coverage in Eclipse but not nearly general purpose.
View gist:5013968
private void runTestsNamed(String... testNames) throws Exception {
for (int i=0; i<testNames.length; ++i) {
Method testCase = this.getClass().getMethod(testNames[i]);
if ((i + 1) < testNames.length) {
You can’t perform that action at this time.