1 require 'spec_helper_acceptance'
3 # NB: There are a large number of helper functions used in these tests.
4 # They make this code much more friendly, but may need to be referenced.
5 # The serverspec helpers (`should`, `be_running`...) are documented here:
6 # http://serverspec.org/resource_types.html
7 # Custom helpers (`install_odl`, `*_validations`) are in:
8 # <this module>/spec/spec_helper_acceptance.rb
10 describe 'opendaylight class' do
11 describe 'testing install methods' do
12 # Call specialized helper fn to install OpenDaylight
15 # Run checks specific to install type, via env var passed from Rakefile
16 if ENV['INSTALL_METHOD'] == 'tarball'
17 # TODO: Call specialized helper fn for tarball-type install validations
19 # Call specialized helper fn for RPM-type install validations
23 # Use helper fn to run generic validations
27 describe 'testing Karaf config file' do
28 describe 'using default features' do
29 context 'and not passing extra features' do
30 # Call specialized helper fn to install OpenDaylight
33 # Call specialized helper fn for Karaf config validations
34 karaf_config_validations
37 context 'and passing extra features' do
38 # These are real but arbitrarily chosen features
39 extra_features = ['odl-base-all', 'odl-ovsdb-all']
41 # Call specialized helper fn to install OpenDaylight
42 install_odl(extra_features: extra_features)
44 # Call specialized helper fn for Karaf config validations
45 karaf_config_validations(extra_features: extra_features)
49 describe 'overriding default features' do
50 # These are real but arbitrarily chosen features
51 default_features = ['standard', 'ssh']
53 context 'and not passing extra features' do
54 # Call specialized helper fn to install OpenDaylight
55 install_odl(default_features: default_features)
57 # Call specialized helper fn for Karaf config validations
58 karaf_config_validations(default_features: default_features)
61 context 'and passing extra features' do
62 # These are real but arbitrarily chosen features
63 extra_features = ['odl-base-all', 'odl-ovsdb-all']
65 # Call specialized helper fn to install OpenDaylight
66 install_odl(default_features: default_features,
67 extra_features: extra_features)
69 # Call specialized helper fn for Karaf config validations
70 karaf_config_validations(default_features: default_features,
71 extra_features: extra_features)