serokell / coffer

Multi-backend password store with multiple frontends
4 stars 2 forks source link

[#23] Add `bats` tests #32

Closed DK318 closed 2 years ago

DK318 commented 2 years ago

Problem: In #29, we implemented almost every CLI action, but we haven't written any tests for them yet.

Solution: write golden tests using bats.

Description

Related issue(s)

dcastro commented 2 years ago

Can you please also make a small amendment to the make bats target? To make it easier for us to run a specific test (or subset of tests)

# Usage:
#   * make bats
#   * make bats FILTER="test name"
bats:
    git submodule update --init --recursive
    ./tests/golden/helpers/bats/bin/bats ./tests/golden/** $(if $(FILTER),-f "$(FILTER)",)