class Gitlab::QA::Component::InternetTunnel

def initialize

def initialize
  super
  key_dir = ENV['CI_PROJECT_DIR'] || Dir.tmpdir
  @ssh_key = Tempfile.new('tunnel-ssh-private-key', key_dir)
  @ssh_key.write(ENV.fetch('TUNNEL_SSH_PRIVATE_KEY'))
  @ssh_key.close
  File.chmod(0o600, @ssh_key.path)
  @volumes['/root/.ssh/id_rsa'] = @ssh_key.path
end