Skip to content

Commit 04e003e

Browse files
committed
chore: fix test failing in ci but not locally
1 parent b58484f commit 04e003e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/test_ops2deb.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _invoke(
6666
):
6767
runner = CliRunner(mix_stderr=False)
6868
for index, configuration in enumerate(configurations):
69-
configuration_paths[index].write_text(configuration)
69+
configuration_paths[index].write_text(dedent(configuration))
7070
os.environ.update(
7171
{
7272
"OPS2DEB_VERBOSE": "1",
@@ -794,7 +794,7 @@ def test_update__doesnt_update_blueprint_when_fetch_fails_for_one_architecture(
794794
# Then
795795
expected_error = "Failed to download http://testserver/1.1.1/great-app-404.tar.gz."
796796
assert expected_error in result.stderr
797-
assert configuration_path.read_text() == configuration
797+
assert configuration_path.read_text() == dedent(configuration)
798798
assert result.exit_code == 77
799799

800800

@@ -828,8 +828,8 @@ def test_update__skips_blueprints_when_skip_option_is_used(
828828

829829
# Then
830830
assert result.exit_code == 0
831-
assert configuration_paths[0].read_text() == configuration_0
832-
assert configuration_paths[1].read_text() == configuration_1
831+
assert configuration_paths[0].read_text() == dedent(configuration_0)
832+
assert configuration_paths[1].read_text() == dedent(configuration_1)
833833

834834

835835
def test_update___updates_only_blueprints_listed_with_only_option(
@@ -867,17 +867,17 @@ def test_update__should_not_produce_configuration_files_that_dont_pass_format_co
867867
call_ops2deb,
868868
):
869869
# Given
870-
configuration = """
870+
configuration = """\
871871
name: great-app
872872
matrix:
873873
versions:
874-
- 1.0.0
875-
- 1.0.1
876-
- 1.1.0
874+
- 1.0.0
875+
- 1.0.1
876+
- 1.1.0
877877
summary: great package
878878
fetch: http://testserver/{{version}}/great-app.tar.gz
879879
script:
880-
- mv great-app {{src}}/usr/bin/great-app
880+
- mv great-app {{src}}/usr/bin/great-app
881881
"""
882882

883883
# When

0 commit comments

Comments
 (0)