Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for attaching auto scaling groups to target groups #330

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

maf23
Copy link
Contributor

@maf23 maf23 commented Dec 13, 2016

This is in reference to #328
Unfortunately I will not have time to implement support for managing
the actual ALBs and all that is reated to them.

This is in reference to fog#328
Unfortunately I will not have time to implement support for managing
the actual ALBs and all that is reated to them.
@@ -35,6 +35,14 @@
Fog::AWS[:auto_scaling].detach_load_balancers(@asg_name, 'LoadBalancerNames' => 'elb-test-fog').body
end

tests("#attach_load_balancer_target_groups").formats(AWS::AutoScaling::Formats::BASIC) do
Fog::AWS[:auto_scaling].attach_load_balancer_target_groups(@asg_name, 'TargetGroupARNs' => 'elb-test-fog').body
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because elb-test-fog is not a real object these tests fail horribly when performing live verification.

0] » FOG_MOCK=false be shindo tests/requests/auto_scaling/
[fog][WARNING] Setting default fog timeout to 2000 seconds

  AWS::AutoScaling | auto_scaling_tests (aws, auto_scaling)
    success
      #create_launch_configuration + has proper format
      #describe_launch_configurations + has proper format
      #describe_launch_configurations + has proper format
      #describe_launch_configurations + has proper format
      #create_auto_scaling_group + has proper format
      #attach_load_balancers - has proper format
      Provided Load Balancers may not be valid. Please ensure they exist and try again. (Fog::AWS::AutoScaling::ValidationError)
        ...
        /Users/jlane/.gem/ruby/2.3.3/gems/fog-xml-0.1.2/lib/fog/xml/sax_parser_connection.rb:35:in `request'
        /Users/jlane/.gem/ruby/2.3.3/gems/fog-xml-0.1.2/lib/fog/xml/connection.rb:7:in `request'
        /Users/jlane/p/fog-aws/lib/fog/aws/auto_scaling.rb:150:in `_request'
        /Users/jlane/p/fog-aws/lib/fog/aws/auto_scaling.rb:144:in `request'
        /Users/jlane/p/fog-aws/lib/fog/aws/requests/auto_scaling/attach_load_balancers.rb:27:in `attach_load_balancers'
        /Users/jlane/p/fog-aws/tests/requests/auto_scaling/auto_scaling_tests.rb:31:in `block (3 levels) in <top (required)>'
        tests/helpers/formats_helper.rb:92:in `block in formats'
        ...
        tests/helpers/formats_helper.rb:85:in `formats'
        /Users/jlane/p/fog-aws/tests/requests/auto_scaling/auto_scaling_tests.rb:30:in `block (2 levels) in <top (required)>'
        ...
        /Users/jlane/p/fog-aws/tests/requests/auto_scaling/auto_scaling_tests.rb:5:in `block in <top (required)>'
        ...
        /Users/jlane/p/fog-aws/tests/requests/auto_scaling/auto_scaling_tests.rb:1:in `<top (required)>'
        ...

There are similar errors for (at|de)tach_load_balancer{_target_groups} and (attach|detach)_instances. I'll wrap the offending calls in a mock only conditional after merge.

@lanej lanej merged commit 35f7083 into fog:master Dec 15, 2016
@lanej
Copy link
Member

lanej commented Dec 15, 2016

Thanks @maf23

@geemus
Copy link
Member

geemus commented Dec 15, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants