Skip to content

Commit

Permalink
ci: Implement test for 'age init'
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 18, 2024
1 parent 4a32569 commit 6168251
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
"""Test case for ``age init``."""

from pathlib import Path
from subprocess import PIPE, run

def test_it():
"""This is stub of test to pass pytest."""
pass

def test_it(target_bin: str, tmp_path: Path):
"""'init' command generate config file."""
proc = run([target_bin, "init"], stdout=PIPE, stderr=PIPE, text=True, cwd=tmp_path)
assert proc.returncode == 0
assert (tmp_path / ".age.toml").exists()

0 comments on commit 6168251

Please sign in to comment.