Skip to content

Commit 5a40218

Browse files
committed
Try to fix tests
1 parent 31830ab commit 5a40218

14 files changed

Lines changed: 54 additions & 0 deletions

bundler.d/krb5.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
gem 'rkerberos', '>= 0.1.1'
33
gem 'gssapi'
44
end
5+
6+
# set a flag that krb5 is available. Only used for tests
7+
USE_KRB5_IN_TESTS = true

bundler.d/libvirt.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
group :libvirt do
22
gem 'ruby-libvirt', '>= 0.6.0'
33
end
4+
5+
# set a flag that libvirt is available. Only used for tests
6+
USE_LIBVIRT_IN_TESTS = true

test/dhcp_libvirt/dhcp_libvirt_config_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dhcp_libvirt/dhcp_libvirt'
37

48
class DhcpLibvirtConfigTest < Test::Unit::TestCase

test/dhcp_libvirt/dhcp_libvirt_provider_interface_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dhcp_libvirt/dhcp_libvirt_main'
37

48
class LibvirtDhcpProviderInterfaceTest < Test::Unit::TestCase

test/dhcp_libvirt/dhcp_libvirt_provider_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dhcp_common/server'
37
require 'dhcp_common/subnet_service'
48
require 'dhcp_libvirt/dhcp_libvirt'

test/dhcp_libvirt/integration_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'json'
37
require 'root/root_v2_api'
48
require 'dhcp/dhcp'

test/dhcp_libvirt/libvirt_dhcp_network_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'ostruct'
37
require 'dhcp_libvirt/libvirt_dhcp_network'
48

test/dhcp_libvirt/production_di_wirings_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dhcp_common/subnet_service'
37
require 'dhcp_common/free_ips'
48
require 'dhcp_libvirt/libvirt_dhcp_network'

test/dhcp_libvirt/subnet_service_initializer_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dhcp_common/subnet_service'
37
require 'dhcp_libvirt/subnet_service_initializer'
48

test/dns_libvirt/dns_libvirt_configuration_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require 'test_helper'
2+
3+
# omit all tests if libvirt is not enabled in tests
4+
Test::Unit::TestCase.omit("libvirt not available/enabled") unless(defined?(USE_LIBVIRT_IN_TESTS) && USE_LIBVIRT_IN_TESTS)
5+
26
require 'dns_libvirt/plugin_configuration'
37
require 'dns_libvirt/dns_libvirt_main'
48

0 commit comments

Comments
 (0)