Answer stability round 1: 0 🔴, 5 🟡 (0 misread); test the two-subcommand cap, an unparsed command, an uneven token sum and a zero-second call, assert each progress line's facts in order, and say in ci.sh why it is sh; the branch endpoint landed with product-owner's answer, and the help now says the highest tag
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import itertools
|
||||
import tempfile
|
||||
import typing
|
||||
import unittest
|
||||
@@ -365,16 +365,14 @@ class Cut(unittest.TestCase):
|
||||
ran = self.cut()
|
||||
self.assert_cut(ran)
|
||||
merged = self.origin_git("rev-parse", "main").strip()
|
||||
self.assertEqual(ran.stderr.splitlines(), [
|
||||
"deploy-release: pushed the branch release-0.2.0",
|
||||
"deploy-release: opened pull request 1",
|
||||
"deploy-release: waiting for the checks of pull request 1; main requires CI / tests (pull_request)",
|
||||
"deploy-release: the checks of pull request 1 passed",
|
||||
"deploy-release: merged pull request 1",
|
||||
f"deploy-release: tagged {merged[:12]} v0.2.0",
|
||||
"deploy-release: pushed the tag v0.2.0",
|
||||
"deploy-release: deleted the branch release-0.2.0 on origin",
|
||||
])
|
||||
# Each step's line, in order, with the facts it must name.
|
||||
steps = [("pushed", "release-0.2.0"), ("opened", "1"), ("waiting", "1", "CI / tests (pull_request)"), ("passed", "1"), ("merged", "1"), ("tagged", merged[:12], "v0.2.0"), ("pushed", "v0.2.0"), ("deleted", "release-0.2.0")]
|
||||
lines = ran.stderr.splitlines()
|
||||
self.assertEqual(len(lines), len(steps), ran.stderr)
|
||||
for line, facts in zip(lines, steps):
|
||||
self.assertTrue(line.startswith("deploy-release: "), line)
|
||||
for fact in facts:
|
||||
self.assertIn(fact, line)
|
||||
self.assertEqual(ran.stdout.splitlines()[-1], f"Done: v0.2.0 is cut and pushed, and {self.target} is on it.")
|
||||
|
||||
def test_deletes_the_merged_release_branch_on_origin(self):
|
||||
|
||||
Reference in New Issue
Block a user