aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_comment_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Kd/ci playwright go test (#20123)Kyle D2022-09-021-204/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add initial playwright config * Simplify Makefile * Simplify Makefile * Use correct config files * Update playwright settings * Fix package-lock file * Don't use test logger for e2e tests * fix frontend lint * Allow passing TEST_LOGGER variable * Init postgres database * use standard gitea env variables * Update playwright * update drone * Move empty env var to commands * Cleanup * Move integrations to subfolder * tests integrations to tests integraton * Run e2e tests with go test * Fix linting * install CI deps * Add files to ESlint * Fix drone typo * Don't log to console in CI * Use go test http server * Add build step before tests * Move shared init function to common package * fix drone * Clean up tests * Fix linting * Better mocking for page + version string * Cleanup test generation * Remove dependency on gitea binary * Fix linting * add initial support for running specific tests * Add ACCEPT_VISUAL variable * don't require git-lfs * Add initial documentation * Review feedback * Add logged in session test * Attempt fixing drone race * Cleanup and bump version * Bump deps * Review feedback * simplify installation * Fix ci * Update install docs
* Refactor AssertExistsAndLoadBean to use generics (#20797)Lunny Xiao2022-08-161-25/+25
| | | | | | | * Refactor AssertExistsAndLoadBean to use generics * Fix tests Co-authored-by: zeripath <art27@cantab.net>
* Move issues related files into models/issues (#19931)Lunny Xiao2022-06-131-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Move access and repo permission to models/perm/access * fix test * fix git test * Move functions sequence * Some improvements per @KN4CK3R and @delvh * Move issues related code to models/issues * Move some issues related sub package * Merge * Fix test * Fix test * Fix test * Fix test * Rename some files
* format with gofumpt (#18184)65432022-01-201-3/+3
| | | | | | | | | | | * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
* Add API to get issue/pull comments and events (timeline) (#17403)qwerty2872022-01-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get issue/pull comments and events (timeline) Adds an API to get both comments and events in one endpoint with all required data. Closes go-gitea/gitea#13250 * Fix swagger * Don't show code comments (use review api instead) * fmt * Fix comment * Time -> TrackedTime * Use var directly * Add logger * Fix lint * Fix test * Add comments * fmt * [test] get issue directly by ID * Update test * Add description for changed refs * Fix build issues + lint * Fix build * Use string enums * Update swagger * Support `page` and `limit` params * fmt + swagger * Use global slices Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move repository model into models/repo (#17933)Lunny Xiao2021-12-101-6/+7
| | | | | | | | | | | | | | | * Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function
* Move user related model into models/user (#17781)Lunny Xiao2021-11-241-6/+7
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* Remove unnecessary variable assignments (#17695)Gusted2021-11-181-2/+2
| | | | | | | | | | * Remove unnecessary variable assignments As title * enable ineffassign Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Decouple unit test, remove intermediate `unittestbridge` package (#17662)wxiaoguang2021-11-161-35/+35
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-191-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* [Refactor] Move APIFormat functions into convert package (#12856)65432020-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | * USER APIFormat -> ToUser * Migrate more and mark APIFormat deprecated * models.Comment APIFormat() -> convert.ToComment * models.Release APIFormat() -> convert.ToRelease * models.Attachments APIFormat() -> convert.ToReleaseAttachments * models.CommitStatus APIFormat() -> convert.ToCommitStatus * finish migration to convert.ToUser * Move Test * Imprufe Test * fix test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [API] Add "before" query to ListIssueComments and ListRepoIssue… (#9685)65432020-01-131-2/+25
| | | | | | | | | * add "before" query to ListIssueComments and ListRepoIssueComments * Add TEST Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* [API] add comments endpoint for single comment (#9494)65432020-01-081-0/+27
| | | | | | | * add GET /repos/{owner}/{repo}/issues/comments/{id} and complete error list for swagger in other func * add repo check
* Fix "data race" in testlogger (#9159)zeripath2019-11-261-5/+5
| | | | | | * Fix data race in testlogger * Update git_helper_for_declarative_test.go
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Enforce token on api routes [fixed critical security issue #4357] (#4840)B-OnTheGo2018-09-101-6/+9
|
* Fix comment API paths (#2813)Ethan Koenig2017-11-201-4/+4
|
* More integration tests for comment API (#2156)Ethan Koenig2017-07-141-1/+90
|
* Less verbose integration tests (#2123)Ethan Koenig2017-07-071-2/+1
| | | * Helper functions for intergration test boilerplate
* Improve integration test helper functions (#2049)Ethan Koenig2017-06-251-3/+1
| | | Set request headers in helper functions, and new helper for requests with string-formatted URLs
* Don't show non-comments in comments API (#2001)Ethan Koenig2017-06-181-0/+39