Skip to content

Commit

Permalink
fix tests after adding retry to curl cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvatt committed Feb 12, 2024
1 parent 0a317ea commit 2ed09a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_quarto_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def test_that_personal_operator_image_is_used(self, dag, quarto):
def test_that_cmds_are_correct(self, dag, quarto):
container = quarto_operator(dag, "name", quarto, "repo")
correct_cmds = ["quarto render quarto.qmd --to html --execute --output index.html -M self-contained:True && "
f"""curl --fail-with-body -X PUT -F [email protected] https://datamarkedsplassen.intern.dev.nav.no/quarto/update/{quarto['id']} -H "Authorization:Bearer {quarto['token']}" """]
f"""curl --fail-with-body --retry 2 -X PUT -F [email protected] https://datamarkedsplassen.intern.dev.nav.no/quarto/update/{quarto['id']} -H "Authorization:Bearer {quarto['token']}" """]
assert container.arguments == correct_cmds

def test_that_quarto_format_is_changed(self, dag, quarto):
quarto["format"] = "pdf"
container = quarto_operator(dag, "name", quarto, "repo")
correct_cmds = ["quarto render quarto.qmd --to pdf --execute --output index.html -M self-contained:True && "
f"""curl --fail-with-body -X PUT -F [email protected] https://datamarkedsplassen.intern.dev.nav.no/quarto/update/{quarto['id']} -H "Authorization:Bearer {quarto['token']}" """]
f"""curl --fail-with-body --retry 2 -X PUT -F [email protected] https://datamarkedsplassen.intern.dev.nav.no/quarto/update/{quarto['id']} -H "Authorization:Bearer {quarto['token']}" """]
assert container.arguments == correct_cmds

def test_that_quarto_deps_is_added_to_allowlist(self, dag, quarto):
Expand Down

0 comments on commit 2ed09a6

Please sign in to comment.