@@ -156,7 +156,7 @@ jobs:
156156 - uses: actions/setup-go@v6
157157` )
158158
159- stdout , stderr , err := runCommandWithHTTP (t , reg , "--diff" , workflowPath )
159+ stdout , stderr , err := runCommandWithHTTP (t , reg , workflowPath )
160160 require .NoError (t , err )
161161 assert .Empty (t , stdout )
162162 assert .Contains (t , stderr , "Resolving 2 action reference(s)..." )
@@ -272,7 +272,7 @@ dependencies:
272272` )
273273
274274 stdout , stderr , err := runCommandWithHTTP (t , reg ,
275- "update" , "--action" , "github.com/actions/checkout" , workflowPath ,
275+ "update" , "--action" , "github.com/actions/checkout" , "--write" , workflowPath ,
276276 )
277277 require .NoError (t , err )
278278 assert .Empty (t , stdout )
@@ -285,38 +285,6 @@ dependencies:
285285 assert .Contains (t , got , "github.com/actions/setup-go@v6:sha1-4a3601121dd01d1626a1e23e37211e3254c1c06c" )
286286}
287287
288- func TestTidyCommand_RemovesStaleEntries (t * testing.T ) {
289- reg := & httpmock.Registry {}
290- defer reg .Verify (t )
291-
292- workflowPath := writeTempWorkflow (t , `
293- name: ci
294- on: push
295- jobs:
296- test:
297- runs-on: ubuntu-latest
298- steps:
299- - uses: actions/checkout@v6
300-
301- # Automatically generated and managed by: gh actions-pin --write <workflow-path>
302- dependencies:
303- - github.com/actions/checkout@v6:sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd
304- - github.com/actions/setup-go@v6:sha1-4a3601121dd01d1626a1e23e37211e3254c1c06c
305- ` )
306-
307- stdout , stderr , err := runCommandWithHTTP (t , reg , "tidy" , workflowPath )
308- require .NoError (t , err )
309- assert .Empty (t , stdout )
310- assert .Contains (t , stderr , "Tidied 1 dependencies" )
311- assert .Contains (t , stderr , "removed 1 stale" )
312-
313- content , readErr := os .ReadFile (workflowPath )
314- require .NoError (t , readErr )
315- got := string (content )
316- assert .Contains (t , got , "github.com/actions/checkout@v6" )
317- assert .NotContains (t , got , "github.com/actions/setup-go@v6" )
318- }
319-
320288const nodeActionYAML = "name: Test Action\n runs:\n using: node20\n "
321289
322290func testRepoResponse (nameWithOwner , oid , actionYAML string ) map [string ]any {
0 commit comments