GithubHelp home page GithubHelp logo

isabella232 / dev-vault Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rapid7/dev-vault

0.0 0.0 0.0 49.17 MB

Created by John Manero via the GitHub Connector

License: MIT License

Ruby 100.00%

dev-vault's Introduction

Dev::Vault

Dev::Vault is a simple wrapper around the Vault binary for development and testing. It bundles all of the published Vault binaries at Dev::Vault::VERSION and runs the correct build for the local system.

Note that Dev::Vault's version follows that of Vault.

Vault is maintained by Hashicorp. Please see https://www.vaultproject.io/ for details.

Installation

Add this line to your application's Gemfile:

gem 'dev-vault'

Or Gemspec:

spec.add_development_dependency 'dev-vault', '0.6.4'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install dev-vault

Usage

Run bundle exec rake to launch a local instance of Vault.

To integrate into tests:

require 'dev/vault'

RSpec.configure do |config|
  config.before(:suite) do
    ## Start Vault with logging suppressed
    Dev::Vault.run(:output => false)
  end

  config.after(:suite) do
    Dev::Vault.stop
  end

  ## ...
end

For more advanced test scenarios involving init, seal, and unseal operations, start a non-dev Vault instance with the inmem storage provider:

require 'dev/vault'

RSpec.describe 'Some Vault Test'
  subject(:vault) do
    Dev::Vault.new(
      :dev => false,
      :port => Dev::Vault::RANDOM_PORT,
      :output => false
    ).run.wait
  end

  after { vault.stop }

  it 'initializes vault' do
    vault.client.sys.init

    expect(vault.client.sys.init_status.initialized?).to be true
  end

This test suite will create and destroy un-initialized vault instances for each case.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rapid7/dev-vault.

dev-vault's People

Contributors

jmanero-r7 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.