Sha256: 2c512414243ccf5654fcb66635c01fe23602212e5f83705fecb5da99ce4890ed

Contents?: true

Size: 1.21 KB

Versions: 38

Compression:

Stored size: 1.21 KB

Contents

require 'spec_helper'

describe 'servers' do
  let!(:client)   { create_client }
  let!(:user)     { client.users.create!(name: Faker::Name.name, email: Faker::Internet.email) }
  let!(:account)  { client.accounts.create!(owner: user, name: Faker::Name.name) }
  let!(:provider) { account.providers.create!(type: "aws").resource! }

  context "with a server", :mock_only do
    let!(:environment) { create_environment(account: account, name: Faker::Name.name) }

    before(:each) do
      pending "adding servers to environments is not yet implemented"
      another_server = create_server(client,
                                     :environment => environment,
                                     :provider => provider,
                                     :provisioned_id => "i-a1000fce",
                                     :state => "running")

      create_server_event(client,
                          :type   => "member-failed",
                          :server => another_server)
    end

    it "should list server events" do
      server = create_server(environment: environment)
      event  = create_server_event(client, type: "memer-failed", server: server)
      expect(server.events.to_a).to eq([event])
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
ey-core-3.1.11 spec/server_events_spec.rb
ey-core-3.1.10 spec/server_events_spec.rb
ey-core-3.1.9 spec/server_events_spec.rb
ey-core-3.1.8 spec/server_events_spec.rb
ey-core-3.1.7 spec/server_events_spec.rb
ey-core-3.1.6 spec/server_events_spec.rb
ey-core-3.1.5 spec/server_events_spec.rb
ey-core-3.1.4 spec/server_events_spec.rb
ey-core-3.1.3 spec/server_events_spec.rb
ey-core-3.1.2 spec/server_events_spec.rb
ey-core-3.1.1 spec/server_events_spec.rb
ey-core-3.1.0 spec/server_events_spec.rb
ey-core-3.0.5 spec/server_events_spec.rb
ey-core-3.0.4 spec/server_events_spec.rb
ey-core-3.0.3 spec/server_events_spec.rb
ey-core-3.0.2 spec/server_events_spec.rb
ey-core-3.0.1 spec/server_events_spec.rb
ey-core-3.0.0 spec/server_events_spec.rb