Skip to content

Commit c4f378e

Browse files
committed
add test
1 parent 876872d commit c4f378e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/api_actions_runner_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,12 @@ func testActionsRunnerRepo(t *testing.T) {
329329
req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/user2/repo1/actions/runners/%d", 34349)).AddTokenAuth(token)
330330
MakeRequest(t, req, http.StatusNotFound)
331331
})
332+
333+
t.Run("DeleteAdminRunnerNotFoundUnknownID", func(t *testing.T) {
334+
userUsername := "user2"
335+
token := getUserToken(t, userUsername, auth_model.AccessTokenScopeWriteRepository)
336+
// Verify delete a runner by unknown id is not found
337+
req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/repos/user2/repo1/actions/runners/%d", 4384797347934)).AddTokenAuth(token)
338+
MakeRequest(t, req, http.StatusNotFound)
339+
})
332340
}

0 commit comments

Comments
 (0)