Skip to content
This repository has been archived by the owner on Feb 16, 2018. It is now read-only.

Latest commit

 

History

History
46 lines (32 loc) · 1.17 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.17 KB

TentValidator

Tent v0.3 protocol validator.

Usage

Integration testing any Tent server implementation

It's assumed you have redis and postgres running.

cd tent-validator
bundle
createdb tent-validator
createdb tent-validator-tentd && DATABASE_URL=postgres://localhost/tent-validator-tentd bundle exec rake db:migrate

echo "VALIDATOR_DATABASE_URL=postgres://localhost/tent-validator 
TENT_DATABASE_URL=postgres://localhost/tent-validator-tentd 
REDIS_URL=redis://127.0.0.1:6379/0 
REDIS_NAMESPACE=tent-validator " > .env

Commandline Runner

require 'tent-validator'

# ... code to run your server implementation ...

server_url = "http://127.0.0.1:3000" # change to wherever the server is running

TentValidator.setup!(
  :remote_entity_uri => server_url,
  :tent_database_url => ENV['VALIDATOR_TENTD_DATABASE_URL'] # tent-validator uses tentd (defaults to `ENV['TENT_DATABASE_URL']`)
)

TentValidator::Runner::CLI.run

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request