Code Monkey home page Code Monkey logo

test-proxy's Introduction

test-proxy

This is a simple HTTP and HTTPS proxy for use with tests. Primarily it is for use with TravisCI, where feature tests may be configured to actually require HTTPS.

Configuration

Create a certificate and a key pem file for your domain. Check them into your repository in spec/support somewhere.

TBD

Add a script to your repository to install the test-proxy and run it:

#!/bin/bash

echo "Installing GVM"
bash < <(curl -s https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer)
source $HOME/.gvm/scripts/gvm

echo "Installing go1.2.1"
gvm install go1.2.1
gvm use go1.2.1

echo "Found Go at:"
echo $(which go)
GO=$(which go)

echo "Installing root certificates"
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
sudo cp $TRAVIS_BUILD_DIR/spec/support/features/cert.pem /etc/ssl/certs && sudo update-ca-certificates

echo "Check out test proxy"
cd /tmp
git clone https://github.com/wanelo/test-proxy.git test-proxy
cd test-proxy

echo "Building proxy"
make
sudo /tmp/test-proxy/bin/test-proxy --port 7171 \
                  --cert $TRAVIS_BUILD_DIR/spec/support/features/cert.pem \
                  --key $TRAVIS_BUILD_DIR/spec/support/features/key.pem &

Add the following to your .travis.yml:

before_script:
  - sudo script/start_test_proxy.sh
after_script:
  - sudo pkill -f test-proxy

Development

make
./bin/test-proxy --help

test-proxy's People

Contributors

sax avatar

Stargazers

Gabriel Francisco avatar

Watchers

 avatar James Cloos avatar Deena Varshavskaya avatar  avatar  avatar

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.