Giter Club home page Giter Club logo

Comments (8)

ned21 avatar ned21 commented on August 15, 2024

I think Perl built in functions can be mocked almost as easily as a module function, but the real benefit of a CAF wrapper is that the component author does not have to think about NoAction support -- it's just part of the library.

from caf.

jouvin avatar jouvin commented on August 15, 2024

It was my point in fact! Provide an API that handles mocking transparently for the component author, without any specific code, variable or whatever. I imagine that most of the things I mentioned will be very simple in term of implementation.

from caf.

piojo-zz avatar piojo-zz commented on August 15, 2024

This is unlikely to happen in the 14.12 cycle...

from caf.

jrha avatar jrha commented on August 15, 2024

Or the 15.4 cycle...

from caf.

jrha avatar jrha commented on August 15, 2024

Or the 15.6 cycle...

from caf.

stdweird avatar stdweird commented on August 15, 2024

@ned21 you can't mock the perl builtins -f etc. Other nice thing would be integration with Test::Quattor, so when you fake the contents of a file with set_file_contents, a file existence test should report this fake file as being present (and the whole subtree should be testable as exsting directories).

i'm willing to do some effort here, but i need something more than just filestatus, i need some basics like

  • LC::Check::_unlink with directory support
  • existence checks for directory (-d), file (-f || -l) or anything (-e || -l)
  • mkdir (also for mocking)

this can all go in one module imho, but it will need a better name. or more than one module.
i would also need some advise how reporting would be handled (do we throw errors? log errors? store error message in some magic exported variable?)

from caf.

stdweird avatar stdweird commented on August 15, 2024

see also

from caf.

jouvin avatar jouvin commented on August 15, 2024

Closing this issue after #142 and #255.

from caf.

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.