Skip to content

Commands are not executed in the order they defined #61

@SimonBaeumer

Description

@SimonBaeumer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions