@@ -15,7 +15,7 @@ def test_validate_missing_schema(tmp_path):
15
15
app , ["validate" , "--env" , "dev" , "--schema" , str (tmp_path / "missing.json" )]
16
16
)
17
17
assert result .exit_code == 1
18
- assert "Schema file not found" in result .stderr
18
+ assert "Schema file not found" in result .output
19
19
20
20
21
21
def test_validate_invalid_schema_json (tmp_path ):
@@ -25,7 +25,7 @@ def test_validate_invalid_schema_json(tmp_path):
25
25
26
26
result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
27
27
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
29
29
30
30
31
31
def test_validate_valid_schema_only (tmp_path ):
@@ -77,7 +77,7 @@ def test_validate_duplicate_keys(tmp_path):
77
77
78
78
result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
79
79
assert result .exit_code == 1
80
- assert "Duplicate key: database" in result .stderr
80
+ assert "Duplicate key: database" in result .output
81
81
82
82
83
83
def test_validate_duplicate_paths (tmp_path ):
@@ -106,7 +106,7 @@ def test_validate_duplicate_paths(tmp_path):
106
106
107
107
result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
108
108
assert result .exit_code == 1
109
- assert "Duplicate path: database.host" in result .stderr
109
+ assert "Duplicate path: database.host" in result .output
110
110
111
111
112
112
def test_validate_invalid_type (tmp_path ):
@@ -128,7 +128,7 @@ def test_validate_invalid_type(tmp_path):
128
128
129
129
result = runner .invoke (app , ["validate" , "--env" , "dev" , "--schema" , str (schema_file )])
130
130
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
132
132
133
133
134
134
def test_validate_values_type_mismatch (tmp_path ):
@@ -161,7 +161,7 @@ def test_validate_values_type_mismatch(tmp_path):
161
161
["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
162
162
)
163
163
assert result .exit_code == 1
164
- assert "Type mismatch for port" in result .stderr
164
+ assert "Type mismatch for port" in result .output
165
165
166
166
167
167
def test_validate_missing_required_value (tmp_path ):
@@ -192,7 +192,7 @@ def test_validate_missing_required_value(tmp_path):
192
192
["validate" , "--env" , "prod" , "--schema" , str (schema_file ), "--values" , str (values_file )],
193
193
)
194
194
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
196
196
197
197
198
198
def test_validate_secret_structure (tmp_path ):
@@ -226,7 +226,7 @@ def test_validate_secret_structure(tmp_path):
226
226
["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
227
227
)
228
228
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
230
230
231
231
232
232
def test_validate_valid_secret (tmp_path , monkeypatch ):
@@ -293,7 +293,7 @@ def test_validate_unknown_key_in_values(tmp_path):
293
293
["validate" , "--env" , "dev" , "--schema" , str (schema_file ), "--values" , str (values_file )],
294
294
)
295
295
assert result .exit_code == 1
296
- assert "Unknown key: unknown-key" in result .stderr
296
+ assert "Unknown key: unknown-key" in result .output
297
297
298
298
299
299
def test_validate_shows_environment_name_in_errors (tmp_path ):
@@ -333,5 +333,5 @@ def test_validate_shows_environment_name_in_errors(tmp_path):
333
333
)
334
334
335
335
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