test: sourcehut_builds trigger

This commit is contained in:
oliverpool
2024-05-22 12:56:51 +02:00
parent 780f176fd9
commit 7b47cb43c1
11 changed files with 19 additions and 8 deletions
+14 -5
View File
@@ -175,7 +175,7 @@ environment:
p := &api.PushPayload{
Ref: "refs/heads/main",
HeadCommit: &api.PayloadCommit{
ID: "69b217caa89166a02b8cd368b64fb83a44720e14",
ID: "b0404943256a1f5a50c3726f4378756b4c1e5704",
Message: "replace simple with complex",
},
Repo: repo,
@@ -187,15 +187,22 @@ environment:
pl, err := pc.Push(p)
require.NoError(t, err)
assert.Equal(t, buildsVariables{
Manifest: `image: archlinux
assert.Equal(t, `image: archlinux
packages:
- nodejs
- npm
- rsync
sources:
- http://localhost:3000/testdata/repo.git#69b217caa89166a02b8cd368b64fb83a44720e14
- http://localhost:3000/testdata/repo.git#b0404943256a1f5a50c3726f4378756b4c1e5704
tasks: []
triggers:
- condition: failure
action: email
to: Jim Jimson <jim@example.org>
# report back the status
- condition: always
action: webhook
url: https://hook.example.org
environment:
BUILD_SUBMITTER: forgejo
BUILD_SUBMITTER_URL: https://example.forgejo.org/
@@ -203,7 +210,9 @@ environment:
deploy: synapse@synapse-bt.org
secrets:
- 7ebab768-e5e4-4c9d-ba57-ec41a72c5665
`,
`, pl.Variables.Manifest)
assert.Equal(t, buildsVariables{
Manifest: pl.Variables.Manifest, // the manifest correctness is checked above, for nicer diff on error
Note: "replace simple with complex",
Tags: []string{"testdata/repo", "branch/main", "complex.yaml"},
Secrets: false,
@@ -1 +0,0 @@
x•NKjÃ0ìZ§xûBÑçɶ ”¬z�ççQã[FQÚ?"=A3óѲmk#ÏüÒ*@š²L3&²)ú”'D$ #²Î’ƒ æ�Š½Ñ¼,#/³„8²Ov‰ƒzIN<Áu'¨‘[;—JŸ¥~á»Ð{þ#'Üe;.xëòƒÜ輋#[K¯Ö[kôy¯áßASq\DA›ìkƵÑïÚÎÔûúØ�~P¯kÙÍÂVO�
@@ -0,0 +1,4 @@
xU�έnƒ0 …w�§°΄k
λ lΡ4υz―0νΒ ¤„%fmί~@ΫύD²Ωωμc<(·Ε�°%␍mη]�NjDΫΟR�
ζ“Aΰ†ι–�ΓυΣ9X•x�φ·¶u�{¶θ;NΆ‹ΆΘ…’4(�GyΣ:Q‚©Oή?…/9 δlhτ|Φ0�cΆύυΞ�l8¶*‘�$?ΓΥdΠΤ»§�**³�>7™Α�ΞΘ–XomµΫUJItmKqνΚΐrh�8>Ρω)�ΊΪ‹FΓ,®�°†77,‘8ΐΛΑ␍{:α0zZfy�‹ξaΩ)
�Ω5�� Κ΄Ψυ„ώ�狉7Ξ‘LΗά―¤)z␍‹yivoQ78J}³θ‡¤
@@ -1 +0,0 @@
x=ЋKnГ0 D»Ц)ё`иkЙ@PdХ{P2™Ё°-AQ›їк] АYјЗIeЯsmэKoDђЖ)¤™µ‘ґ8Ѕp gg44вlЉИFQ±ССБп•”F9ѓВ�жИV­,“[ЈUЦО¤`~ф[iрVЪ•Ю њщчёРчєС4к+(Їф0Y)б$µ”"эМлФ lщ“Z-eѓу5чЛwПФ¦КёNЬюЩY»?V4Є&‚ЏМtпрИэC9ю=aШо№в ™,PЎ
@@ -1 +1 @@
69b217caa89166a02b8cd368b64fb83a44720e14
b0404943256a1f5a50c3726f4378756b4c1e5704