Update tests
This commit is contained in:
parent
2f0f387e11
commit
09ec38e8d7
1 changed files with 4 additions and 4 deletions
8
pkg/cmd/cache/delete/delete_test.go
vendored
8
pkg/cmd/cache/delete/delete_test.go
vendored
|
|
@ -217,7 +217,7 @@ func TestDeleteRun(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "no caches to delete when deleting all",
|
||||
opts: DeleteOptions{Identifier: "123", DeleteAll: true},
|
||||
opts: DeleteOptions{DeleteAll: true},
|
||||
stubs: func(reg *httpmock.Registry) {
|
||||
reg.Register(
|
||||
httpmock.REST("GET", "repos/OWNER/REPO/actions/caches"),
|
||||
|
|
@ -233,7 +233,7 @@ func TestDeleteRun(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "no caches to delete when deleting all but succeed on no cache tty",
|
||||
opts: DeleteOptions{Identifier: "123", DeleteAll: true, SucceedOnNoCaches: true},
|
||||
opts: DeleteOptions{DeleteAll: true, SucceedOnNoCaches: true},
|
||||
stubs: func(reg *httpmock.Registry) {
|
||||
reg.Register(
|
||||
httpmock.REST("GET", "repos/OWNER/REPO/actions/caches"),
|
||||
|
|
@ -249,7 +249,7 @@ func TestDeleteRun(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "no caches to delete when deleting all but succeed on no cache non-tty",
|
||||
opts: DeleteOptions{Identifier: "123", DeleteAll: true, SucceedOnNoCaches: true},
|
||||
opts: DeleteOptions{DeleteAll: true, SucceedOnNoCaches: true},
|
||||
stubs: func(reg *httpmock.Registry) {
|
||||
reg.Register(
|
||||
httpmock.REST("GET", "repos/OWNER/REPO/actions/caches"),
|
||||
|
|
@ -261,7 +261,7 @@ func TestDeleteRun(t *testing.T) {
|
|||
},
|
||||
tty: false,
|
||||
wantErr: false,
|
||||
wantStdout: "",
|
||||
wantStdout: "✓ No caches to delete\n",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue