require 'spec_helper_acceptance'

describe 'basic gnocchi' do

  context 'default parameters' do

    it 'should work with no errors' do
      pp = <<-EOS
      include ::openstack_integration
      include ::openstack_integration::repos
      include ::openstack_integration::mysql
      include ::openstack_integration::keystone

      class { '::gnocchi::db::mysql':
        password => 'a_big_secret',
      }
      class { '::gnocchi::keystone::auth':
        password => 'a_big_secret',
      }
      class { '::gnocchi':
        debug               => true,
        database_connection => 'mysql+pymysql://gnocchi:a_big_secret@127.0.0.1/gnocchi?charset=utf8',
      }
      class { '::gnocchi::keystone::authtoken':
        password => 'a_big_secret',
      }
      class { '::gnocchi::api':
        enabled      => true,
        service_name => 'httpd',
        sync_db      => true,
      }
      class { '::gnocchi::metricd': }
      class { '::gnocchi::storage': }
      class { '::gnocchi::storage::file': }
      include ::apache
      class { '::gnocchi::wsgi::apache':
        ssl => false,
      }
      class { '::gnocchi::statsd':
        archive_policy_name => 'high',
        flush_delay         => '100',
        resource_id         => '07f26121-5777-48ba-8a0b-d70468133dd9',
        user_id             => 'f81e9b1f-9505-4298-bc33-43dfbd9a973b',
        project_id          => '203ef419-e73f-4b8a-a73f-3d599a72b18d',
      }
      class { '::gnocchi::client': }
      EOS

      # Run it twice and test for idempotency
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end

    describe port(8041) do
      it { is_expected.to be_listening }
    end

  end
end

require 'spec_helper_acceptance'

describe 'basic gnocchi' do

  context 'default parameters' do

    it 'should work with no errors' do
      pp = <<-EOS
      include ::openstack_integration
      include ::openstack_integration::repos
      include ::openstack_integration::mysql
      include ::openstack_integration::keystone
      class { '::openstack_integration::gnocchi':
        integration_enable => false,
      }
      EOS

      # Run it twice and test for idempotency
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end

    describe port(8041) do
      it { is_expected.to be_listening }
    end

  end
end

Switch acceptance test to use integration classes
Switch acceptance test to use integration classes

Change-Id: I79e4be4ff0a3eca635979c9b2ac9c0a2b33c9954
Depends-On: I3680dbad11435ac82ad03d0195d8e348d21b1433
