Coder Social home page Coder Social logo

Issues with new options... about beaker HOT 5 CLOSED

voxpupuli avatar voxpupuli commented on July 18, 2024
Issues with new options...

from beaker.

Comments (5)

petems avatar petems commented on July 18, 2024

This also appears to mean that any parameter that already existed that didn't have an equals before (--parseonly, --verbose etc.) don't work anymore?

from beaker.

anodelman avatar anodelman commented on July 18, 2024

Hm, if we can't come up with a fix reasonably quickly we should probably back out the original PR.

from beaker.

electrical avatar electrical commented on July 18, 2024

By the looks of it, when it doesn't have a value ( no key=value ) the value should be 'nil' like here

@petems can you extend your test to see if '--verbose=' exits or not?

Looking at here it automatically moves an option to a flag instead of an option when the value is nil.

from beaker.

petems avatar petems commented on July 18, 2024

Ok, I've fixed the first part of it to use nil now: PR #313

However, when I tried to add a test to specifically check that --noop=true was absent, the test failed, even though it looked just like the future parser test:

    it 'can set the --noops flag' do
      subject.should_receive( :create_remote_file ).and_return( true )
      expect( subject ).to receive( :on ).with {|h, command, opts|
        cmdline = command.cmd_line( h )
        expect( h ).to be == agent
        expect( cmdline ).to include('puppet apply')
        expect( cmdline ).to include('--detailed-exitcodes')
        expect( cmdline ).to include('--verbose')
        expect( cmdline ).to include('--noop')
        expect( cmdline ).to_not include('--noop=')
      }
      subject.apply_manifest_on(
        agent,
        'class { "boo": }',
        :acceptable_exit_codes => (1..5),
        :noop                  => true,
        :expect_failures       => true,
      )
    end

from beaker.

petems avatar petems commented on July 18, 2024

@electrical suggests it doesnt support the to_not include?

from beaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.