FAQ
Hi all,

I wanted to ask you out there how you test your salt setup? The thing is
that I can't find anything useful about this subject related to Salt.
Maybe my ignorance is showing now. But if that's the case then I'd like
to be enlightened ;)

What I'm specially interested in are the following subjects:


Does it compile? Any Syntax-Errors?

Something like a smoke test I guess. Currently I use a Docker container
which I run with "test=true". This is the fastest method I could come up
with. This is very helpful when developing formulas and I just want to
see if I made any typers or syntax errors(which happens very often with
YAML).


Testing single salt-formulas without executing them

Something like rspec-puppet. Just to make sure that my formulas do what
they are supposed to do or handle incoming data(i.e. grains or pillars)
correctly. It would be even better if I could insert dependencies to
other formulas. Such I can see directly if my changes broke something
else. But I have no idea on how to do that in Salt.


System-Tests

Is the server configured like I want it to be? I know only two tools in
this category. Those are Serverspec and Cucumber. Both have very
specialized functionality and can't be used for a complete test alone.
Also I don't like them very much and like to know if there are other
methods in use. If there are other methods out there I really like to
know about them.

So how do you test?

Cheers, Markus

Search Discussions

  • Markus \"Shorty\" Uckelmann at Sep 9, 2014 at 12:46 pm
    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Shorty
  • Colton Myers at Oct 27, 2014 at 10:59 pm
    Hey Shorty,

    To date, the only real test interface is states run with `test=True`. We hope to add more explicit testing mechanisms and procedures in the future.

    --
    Colton Myers
    Platform Engineer, SaltStack
    On Sep 7, 2014, at 1:58 PM, Markus Shorty Uckelmann wrote:

    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Shorty
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Charles Baker at Oct 28, 2014 at 2:12 pm
    +1 for more testing capabilities
    On Mon, Oct 27, 2014 at 6:59 PM, Colton Myers wrote:

    Hey Shorty,

    To date, the only real test interface is states run with `test=True`. We
    hope to add more explicit testing mechanisms and procedures in the future.

    --
    Colton Myers
    Platform Engineer, SaltStack
    On Sep 7, 2014, at 1:58 PM, Markus Shorty Uckelmann wrote:

    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Shorty
    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    Charles H. Baker
    864.990.1297
    Knowing is not enough; we must apply. Willing is not enough; we must do.
    Bruce Lee

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Arnold Bechtoldt at Oct 28, 2014 at 3:12 pm
    +1

    --
    Arnold Bechtoldt

    Karlsruhe, Germany

    Am 27.10.14 um 23:59 schrieb Colton Myers:
    Hey Shorty,

    To date, the only real test interface is states run with `test=True`. We hope to add more explicit testing mechanisms and procedures in the future.

    --
    Colton Myers
    Platform Engineer, SaltStack
    On Sep 7, 2014, at 1:58 PM, Markus Shorty Uckelmann wrote:

    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Shorty
  • Markus Uckelmann at Sep 9, 2014 at 2:55 pm

    Am 08.09.2014 um 20:50 schrieb Markus Uckelmann:
    Hi all,
    Sorry for the duplicate. Somehow my first mail got stuck and I tried
    it with another mail address. This didn't work too. Now both mails
    appeared a few minutes ago.

    Regards, Shorty

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Timothy Kelley at Sep 9, 2014 at 4:02 pm
    We have a sandbox environment with it's own separate master that we test
    states on. We keep custom grain files on them we can use to imitate other
    environments
    On Mon, Sep 8, 2014 at 1:50 PM, Markus Uckelmann wrote:

    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Markus



    --
    Tim Kelley

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Vye at Sep 9, 2014 at 7:27 pm
    I've been experimenting with behave <http://pythonhosted.org/behave/> and
    the LocalClient
    <http://docs.saltstack.com/en/latest/ref/clients/#localclient> API. The
    .feature files are also being automatically included into our Sphinx
    documentation.

    The CI starts a docker container and runs highstate then the behave tests.
    The job passes if both complete without errors. The neat thing is that the
    same tests are just as useful in prod. All of the tests are installed on
    the master so I can execute a quick sanity test against any of my minions
    at will.

    So far it has worked out well, but the test suite is not very large yet.
    On Tue, Sep 9, 2014 at 9:02 AM, Timothy Kelley wrote:

    We have a sandbox environment with it's own separate master that we test
    states on. We keep custom grain files on them we can use to imitate other
    environments

    On Mon, Sep 8, 2014 at 1:50 PM, Markus Uckelmann <
    markus.uckelmann@koeln.de> wrote:
    Hi all,

    I wanted to ask you out there how you test your salt setup? The thing is
    that I can't find anything useful about this subject related to Salt.
    Maybe my ignorance is showing now. But if that's the case then I'd like
    to be enlightened ;)

    What I'm specially interested in are the following subjects:


    Does it compile? Any Syntax-Errors?

    Something like a smoke test I guess. Currently I use a Docker container
    which I run with "test=true". This is the fastest method I could come up
    with. This is very helpful when developing formulas and I just want to
    see if I made any typers or syntax errors(which happens very often with
    YAML).


    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.


    System-Tests

    Is the server configured like I want it to be? I know only two tools in
    this category. Those are Serverspec and Cucumber. Both have very
    specialized functionality and can't be used for a complete test alone.
    Also I don't like them very much and like to know if there are other
    methods in use. If there are other methods out there I really like to
    know about them.

    So how do you test?

    Cheers, Markus



    --
    Tim Kelley

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    -Vye

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Alfredo Palhares at Sep 10, 2014 at 10:03 am
    Hello Markus,
    Testing single salt-formulas without executing them

    Something like rspec-puppet. Just to make sure that my formulas do what
    they are supposed to do or handle incoming data(i.e. grains or pillars)
    correctly. It would be even better if I could insert dependencies to
    other formulas. Such I can see directly if my changes broke something
    else. But I have no idea on how to do that in Salt.
    For single formula testing I use kitchen-salt[0] you try an example with
    our influxdb-formula.


    [0] https://github.com/simonmcc/kitchen-salt
    [1] https://github.com/seegno/influxdb-formula

    --
    Regards,
    Alfredo Palhares

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedSep 9, '14 at 12:45p
activeOct 28, '14 at 3:12p
posts9
users8

People

Translate

site design / logo © 2022 Grokbase