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

Commands are not executed in the order they defined #61

Open
SimonBaeumer opened this issue Jul 8, 2019 · 0 comments
Open

Commands are not executed in the order they defined #61

SimonBaeumer opened this issue Jul 8, 2019 · 0 comments

Comments

@SimonBaeumer
Copy link
Owner

Hi,

I've two ideas.

  1. I'd like to define multiple commands in goss.yml and I expect they are being run in the same order as they go in the file. But they do not run in the same order, sometimes they do. It looks like they run randomly.
    Example of commands:
  • mount a NFS share
  • check permissions
  • unmount the share.

It would be great if it possible to define either order of execution (maybe add an option "priority") or just follow the order the commands are defined in goss.yml.

  1. I feel a big inconvenience in running multiple commands using "command" test. It would be awesome to have a test called script where I can specify a code of a multiline script. This might look like this:
script:
  myscript:
    body: |
      #!/bin/bash, #!/usr/bin/env python, #!/usr/bin/awk, #!/usr/bin/sed, etc
      as many as need shell/python/awk/etc commands or other script language instructions
      on many lines
   exit-status: 
   stdout: []
  ... etc ...

I know I can put needed scripts on a target host/image and execute it using command but the powerfull side of Goss is a simplicity. I wouldn't like to split a simple configuration into multiple pieces.

Thanks,
Dmitrii

Imported from goss-org/goss#455

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

No branches or pull requests

1 participant