Skip to content

Commit 39bd530

Browse files
committed
Added a hint how to fix unsupported compose errors
1 parent 8cd049f commit 39bd530

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/schema_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def check_usage_scenario(self, usage_scenario):
165165
error_message = e.autos[2:]
166166

167167
if 'Wrong key' in e.code:
168-
raise SchemaError(f"Your compose file does contain a key that GMT does not support - Please check if the container will still run as intended: {error_message}") from e
168+
raise SchemaError(f"Your compose file does contain a key that GMT does not support - Please check if the container will still run as intended. If you want to ignore this error you can add the attribute `ignore-unsupported-compose: true` to your usage_scenario.yml\nError: {error_message}") from e
169169

170170
raise SchemaError(error_message) from e
171171

tests/test_usage_scenario.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_unsupported_compose():
189189
with pytest.raises(SchemaError) as e:
190190
with Tests.RunUntilManager(runner) as context:
191191
context.run_until('setup_services')
192-
assert str(e.value) == 'Your compose file does contain a key that GMT does not support - Please check if the container will still run as intended: ["Wrong key \'blkio_config\' in {\'image\': \'alpine\', \'blkio_config\': {\'weight\': 300}}"]'
192+
assert str(e.value) == 'Your compose file does contain a key that GMT does not support - Please check if the container will still run as intended. If you want to ignore this error you can add the attribute `ignore-unsupported-compose: true` to your usage_scenario.yml\nError: ["Wrong key \'blkio_config\' in {\'image\': \'alpine\', \'blkio_config\': {\'weight\': 300}}"]'
193193

194194
def test_skip_unsupported_compose():
195195
runner = Runner(uri=GMT_DIR, uri_type='folder', filename='tests/data/usage_scenarios/skip_unsupported_compose.yml', skip_system_checks=True, dev_no_metrics=True, dev_no_phase_stats=True, dev_no_sleeps=True, dev_cache_build=False)

0 commit comments

Comments
 (0)