Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Pipe does not work in the test #10

@roderik

Description

@roderik

Hello,

after seeing the screencast by @drnic i'm trying out bats in test-kitchen. But 'im having trouble with the most basic test

#!/usr/bin/env bats

@test "Test if GitHub is in the global ssh_known_hosts file" {
    run cat /etc/ssh/ssh_known_hosts | grep github
    [ "$status" -eq 0 ]
}

With | grep github -> failure
Without | grep github -> succes but this doesn't test what i want it to test
Running by hand exit value is 0

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