@@ -15,7 +15,7 @@ def test_validate_missing_schema(tmp_path):
1515 app , ["validate" , "--env" , "dev" , "--schema" , str (tmp_path / "missing.json" )]
1616 )
1717 assert result .exit_code == 1
18- assert "Schema file not found" in result .stderr
18+ assert "Schema file not found" in result .output
1919
2020
2121def test_validate_invalid_schema_json (tmp_path ):
@@ -25,7 +25,7 @@ def test_validate_invalid_schema_json(tmp_path):
2525
2626 result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
2727 assert result .exit_code == 1
28- assert "Invalid JSON in schema file" in result .stderr
28+ assert "Invalid JSON in schema file" in result .output
2929
3030
3131def test_validate_valid_schema_only (tmp_path ):
@@ -77,7 +77,7 @@ def test_validate_duplicate_keys(tmp_path):
7777
7878 result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
7979 assert result .exit_code == 1
80- assert "Duplicate key: database" in result .stderr
80+ assert "Duplicate key: database" in result .output
8181
8282
8383def test_validate_duplicate_paths (tmp_path ):
@@ -106,7 +106,7 @@ def test_validate_duplicate_paths(tmp_path):
106106
107107 result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
108108 assert result .exit_code == 1
109- assert "Duplicate path: database.host" in result .stderr
109+ assert "Duplicate path: database.host" in result .output
110110
111111
112112def test_validate_invalid_type (tmp_path ):
@@ -128,7 +128,7 @@ def test_validate_invalid_type(tmp_path):
128128
129129 result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
130130 assert result .exit_code == 1
131- assert "Invalid schema" in result .stderr or "Invalid type" in result .stderr
131+ assert "Invalid schema" in result .output or "Invalid type" in result .output
132132
133133
134134def test_validate_values_type_mismatch (tmp_path ):
@@ -161,7 +161,7 @@ def test_validate_values_type_mismatch(tmp_path):
161161 ["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
162162 )
163163 assert result .exit_code == 1
164- assert "Type mismatch for port" in result .stderr
164+ assert "Type mismatch for port" in result .output
165165
166166
167167def test_validate_missing_required_value (tmp_path ):
@@ -192,7 +192,7 @@ def test_validate_missing_required_value(tmp_path):
192192 ["validate" , "--env" , "prod" , "--schema" , str (schema_file ), "--values" , str (values_file )],
193193 )
194194 assert result .exit_code == 1
195- assert "Missing required value: database-host" in result .stderr
195+ assert "Missing required value: database-host" in result .output
196196
197197
198198def test_validate_secret_structure (tmp_path ):
@@ -226,7 +226,7 @@ def test_validate_secret_structure(tmp_path):
226226 ["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
227227 )
228228 assert result .exit_code == 1
229- assert "Invalid secret structure for api-key" in result .stderr
229+ assert "Invalid secret structure for api-key" in result .output
230230
231231
232232def test_validate_valid_secret (tmp_path , monkeypatch ):
@@ -293,7 +293,7 @@ def test_validate_unknown_key_in_values(tmp_path):
293293 ["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
294294 )
295295 assert result .exit_code == 1
296- assert "Unknown key: unknown-key" in result .stderr
296+ assert "Unknown key: unknown-key" in result .output
297297
298298
299299def test_validate_shows_environment_name_in_errors (tmp_path ):
@@ -333,5 +333,5 @@ def test_validate_shows_environment_name_in_errors(tmp_path):
333333 )
334334
335335 assert result .exit_code == 1
336- assert "Missing required value: database-host" in result .stderr
337- assert "staging" in result .stderr
336+ assert "Missing required value: database-host" in result .output
337+ assert "staging" in result .output
0 commit comments