# tests/test_observability.py

import pytest
from pathlib import Path
from conduit_core.cli import app
from typer.testing import CliRunner

runner = CliRunner()


@pytest.mark.skip(reason="Dry-run/verbose flags not in v1.0")
def test_dry_run_flag():
    """Test that --dry-run flag works"""
    result = runner.invoke(app, ["run", "--dry-run"])

    assert result.exit_code == 0
    assert "DRY RUN MODE" in result.stdout
    assert "Would process" in result.stdout or "Ingen data vil bli skrevet" in result.stdout


@pytest.mark.skip(reason="Dry-run/verbose flags not in v1.0")
def test_verbose_flag():
    """Test that --verbose flag works"""
    result = runner.invoke(app, ["run", "--verbose"])

    # Should show more detailed logging
    assert "VERBOSE MODE" in result.stdout or result.exit_code == 0


def test_dry_run_does_not_write_data(tmp_path):
    """Test that dry-run doesn't actually write data"""
    output_file = tmp_path / "test_output.csv"

    # Create a test config that would write to output_file
    # Run with --dry-run
    # Verify output_file doesn't exist

    # This test would need a test config file
    # For now, we'll skip implementation
    pass