#
# Copyright 2012, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require File.expand_path('../support/helpers', __FILE__)

describe 'chef-client::service' do
  include Helpers::ChefClient
  it "starts the chef-client service" do
    r = Chef::Resource::Service.new("chef-client", @run_context)
    r.provider Chef::Provider::Service::Upstart
    current_resource = r.provider_for_action(:start).load_current_resource
    current_resource.running.must_equal true
  end
end

#
# Copyright 2012, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require File.expand_path('../support/helpers', __FILE__)

describe 'chef-client::service' do
  include Helpers::ChefClient
  it "starts the chef-client service" do
    service('chef-client').must_be_running
  end
end

Revert f64d9017 from main server_test
 [COOK-3874] Revert f64d9017 from main server_test

Signed-off-by: Sean OMeara <4025b808ec3cf11e3d5c9a1a3bd1e7c4003cb3a1@opscode.com>
