From 55dd91a2eb8c2842a8c8bd9d4862bcb5d4e89a71 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 11 Dec 2014 12:41:38 +0000 Subject: Renamed ldap test so it gets included in the test suite --- t/test-ldap-probe.rb | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ t/test-ldap-probe.t | 64 ---------------------------------------------------- 2 files changed, 64 insertions(+), 64 deletions(-) create mode 100755 t/test-ldap-probe.rb delete mode 100755 t/test-ldap-probe.t diff --git a/t/test-ldap-probe.rb b/t/test-ldap-probe.rb new file mode 100755 index 0000000..4e552b4 --- /dev/null +++ b/t/test-ldap-probe.rb @@ -0,0 +1,64 @@ +#!/usr/bin/ruby -Ilib/ -I../lib/ + + +require 'test/unit' + +require 'custodian/protocoltests' + + + +class TestLDAPProbe < Test::Unit::TestCase + + # + # Create the test suite environment: NOP. + # + def setup + end + + # + # Destroy the test suite environment: NOP. + # + def teardown + end + + + # + # Test the sanity of a good test. + # + def test_expected_usage + test = nil + + assert_nothing_raised do + test = Custodian::TestFactory.create( "auth.bytemark.co.uk must run ldap on 389 with username 'testing' with password 'bob' otherwise 'LDAP dead?'." ) + end + + assert( test ) + assert_equal( test.get_type, "ldap" ) + end + + + + # + # Ensure missing a test raises an error. + # + def test_missing_ldap() + # + # test data + # + data = [ + "foo.example.com must run ldap on 389.", + "foo.example.com must run ldap with username 'test'.", + "foo.example.com must run ldap with uername 'test' with password 'x'." + ] + + # + # For each test + # + data.each do |str| + assert_raise ArgumentError do + test = Custodian::TestFactory.create( str ) + end + end + end + +end diff --git a/t/test-ldap-probe.t b/t/test-ldap-probe.t deleted file mode 100755 index 4e552b4..0000000 --- a/t/test-ldap-probe.t +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/ruby -Ilib/ -I../lib/ - - -require 'test/unit' - -require 'custodian/protocoltests' - - - -class TestLDAPProbe < Test::Unit::TestCase - - # - # Create the test suite environment: NOP. - # - def setup - end - - # - # Destroy the test suite environment: NOP. - # - def teardown - end - - - # - # Test the sanity of a good test. - # - def test_expected_usage - test = nil - - assert_nothing_raised do - test = Custodian::TestFactory.create( "auth.bytemark.co.uk must run ldap on 389 with username 'testing' with password 'bob' otherwise 'LDAP dead?'." ) - end - - assert( test ) - assert_equal( test.get_type, "ldap" ) - end - - - - # - # Ensure missing a test raises an error. - # - def test_missing_ldap() - # - # test data - # - data = [ - "foo.example.com must run ldap on 389.", - "foo.example.com must run ldap with username 'test'.", - "foo.example.com must run ldap with uername 'test' with password 'x'." - ] - - # - # For each test - # - data.each do |str| - assert_raise ArgumentError do - test = Custodian::TestFactory.create( str ) - end - end - end - -end -- cgit v1.2.1