File: gssapi_simple_spec.rb

package info (click to toggle)
ruby-gssapi 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ruby: 770; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$: << File.dirname(__FILE__) + '/../../lib/'
require 'gssapi'
require 'base64'
require 'yaml'


describe GSSAPI::Simple, 'Test the Simple GSSAPI interface' do

  before :all do
    @conf = YAML.load_file "#{File.dirname(__FILE__)}/conf_file.yaml"
  end

  it 'should get the initial context for a client' do
    gsscli = GSSAPI::Simple.new(@conf[:c_host], @conf[:c_service])
    token = gsscli.init_context
    expect(token).not_to be_empty
  end

  it 'should acquire credentials for a server service' do
    gsscli = GSSAPI::Simple.new(@conf[:s_host], @conf[:s_service], @conf[:keytab])
    expect(gsscli.acquire_credentials).to be_truthy
  end

end