Skip to content

Commit

Permalink
use temp directory
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>
  • Loading branch information
dhuckins committed Jun 22, 2023
1 parent ec5c9ad commit 7a386e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/support/vault_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require "singleton"
require "timeout"
require "tempfile"
require "tmpdir"
require "testcontainers"

module RSpec
Expand All @@ -25,7 +26,9 @@ def initialize(vault_version = nil)
end
end

fs_binds = { Pathname.new(File.expand_path("../../tmp", __FILE__)).to_s => "/tmp" }
dir = Dir.mktmpdir("vault-ruby-tests-")
at_exit { FileUtils.remove_entry(dir) }
fs_binds = { dir => "/tmp" }
@container = Testcontainers::DockerContainer
.new("hashicorp/vault:#{vault_version}")
.with_exposed_port(8200)
Expand Down

0 comments on commit 7a386e7

Please sign in to comment.