forked from cloudron-apps/gitea-app
Compare commits
86 commits
Author | SHA1 | Date | |
---|---|---|---|
2c34ac688d | |||
131e6e3a4a | |||
91a4722885 | |||
|
8808e8c0b2 | ||
|
d00238c1ad | ||
|
07442c675c | ||
|
ed1846cd28 | ||
|
e10793d421 | ||
|
9eea9fe0be | ||
|
298cb33e86 | ||
|
89240fc070 | ||
|
6b2af3eab4 | ||
|
32eebcff8f | ||
|
166dac9b12 | ||
|
26db0254c7 | ||
|
35e3edaa6c | ||
|
93370fa502 | ||
|
3398da164d | ||
|
6ce20e9e75 | ||
|
cb14653680 | ||
|
46982e68f7 | ||
|
a2d2edabaf | ||
|
7261adc546 | ||
|
a338dc215a | ||
|
a12cf5f70b | ||
|
730611229e | ||
|
fcb4caff89 | ||
|
200dc7676f | ||
|
320fbf86d9 | ||
|
04d857e88b | ||
|
e2f6fb52b3 | ||
|
4224cc9692 | ||
|
d416ec0dc7 | ||
|
ea5ff4e574 | ||
|
27720786bf | ||
|
f48a4c4d72 | ||
|
65fbb9cb7d | ||
|
63bfe621d1 | ||
|
a6688ede57 | ||
|
7f2646bfb3 | ||
|
aafc1968ec | ||
|
2f85d288e0 | ||
|
e5296ab5ee | ||
|
77e05f56bf | ||
|
4eab21379e | ||
|
1da61b548f | ||
|
76df0b0113 | ||
|
d9fa8399fe | ||
|
aa0b00cd1e | ||
|
8999bc9112 | ||
|
a7734d29fb | ||
|
b667082cec | ||
|
9abcb0c5ec | ||
|
3f6593c676 | ||
|
5f7b0457db | ||
|
7adfed915b | ||
|
2af74e6817 | ||
|
57ad6d200a | ||
|
4df53960f5 | ||
|
2fb28433fb | ||
|
6874ea9d46 | ||
|
2c284d36fa | ||
|
83da665570 | ||
|
a427a098fe | ||
|
eb4f29375b | ||
|
05dcb14e8d | ||
|
5a03ee8f27 | ||
|
e62f99643d | ||
|
73027148c6 | ||
|
67a138be41 | ||
|
2c32dcf6bd | ||
|
dc7f7e2f4e | ||
|
9a03f268cb | ||
|
fde6dfa485 | ||
|
8b16de1dcd | ||
|
1074999c40 | ||
|
0cfe7fea88 | ||
|
a3bb9db92e | ||
|
8c84f905e7 | ||
|
0008351e7c | ||
|
0aab01b926 | ||
|
2877b4e599 | ||
|
f5f690ebd9 | ||
|
4a5bf98d60 | ||
|
3e84ab8730 | ||
|
c0d7b41a77 |
14 changed files with 2254 additions and 942 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -761,3 +761,334 @@
|
||||||
* Fix milestone counters on new issue (#16183) (#16224)
|
* Fix milestone counters on new issue (#16183) (#16224)
|
||||||
* reqOrgMembership calls need to be preceded by reqToken (#16198) (#16219)
|
* reqOrgMembership calls need to be preceded by reqToken (#16198) (#16219)
|
||||||
|
|
||||||
|
[1.21.5]
|
||||||
|
* Update Gitea to 1.14.5
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.14.5)
|
||||||
|
* Hide mirror passwords on repo settings page (#16022) (#16355)
|
||||||
|
* Update bluemonday to v1.0.15 (#16379) (#16380)
|
||||||
|
* Retry rename on lock induced failures (#16435) (#16439)
|
||||||
|
* Validate issue index before querying DB (#16406) (#16410)
|
||||||
|
* Fix crash following ldap authentication update (#16447) (#16449)
|
||||||
|
* Redirect on bad CSRF instead of presenting bad page (#14937) (#16378)
|
||||||
|
|
||||||
|
[1.21.6]
|
||||||
|
* Update Gitea to 1.14.6
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.14.6)
|
||||||
|
* SECURITY
|
||||||
|
* Bump github.com/markbates/goth from v1.67.1 to v1.68.0 (#16538) (#16540)
|
||||||
|
* Switch to maintained JWT lib (#16532) (#16535)
|
||||||
|
* Upgrade to latest version of golang-jwt (as forked for 1.14) (#16590) (#16607)
|
||||||
|
|
||||||
|
[1.22.0]
|
||||||
|
* Update Gitea to 1.15.0
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.0)
|
||||||
|
|
||||||
|
[1.22.1]
|
||||||
|
* Update Gitea to 1.15.1
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.1)
|
||||||
|
|
||||||
|
[1.22.2]
|
||||||
|
* Update Gitea to 1.15.2
|
||||||
|
* Add unique constraint back into issue_index (#16938)
|
||||||
|
* Close storage objects before cleaning (#16934) (#16942)
|
||||||
|
|
||||||
|
[1.22.3]
|
||||||
|
* Update Gitea to 1.15.3
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.3)
|
||||||
|
* Add fluid to ui container class to remove margin (#16396) (#16976)
|
||||||
|
* Add caller to cat-file batch calls (#17082) (#17089)
|
||||||
|
* Many bug fixes
|
||||||
|
|
||||||
|
[1.22.4]
|
||||||
|
* Update Gitea to 1.15.4
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.4)
|
||||||
|
* Raw file API: don't try to interpret 40char filenames as commit SHA (#17185) (#17272)
|
||||||
|
* Don't allow merged PRs to be reopened (#17192) (#17271)
|
||||||
|
* Fix incorrect repository count on organization tab of dashboard (#17256) (#17266)
|
||||||
|
* Fix unwanted team review request deletion (#17257) (#17264)
|
||||||
|
* Fix broken Activities link in team dashboard (#17255) (#17258)
|
||||||
|
* API pull's head/base have correct permission(#17214) (#17245)
|
||||||
|
* Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223) (#17227)
|
||||||
|
* Upgrade xorm to v1.2.5 (#17177) (#17188)
|
||||||
|
* Fix missing repo link in issue/pull assigned emails (#17183) (#17184)
|
||||||
|
* Fix bug of get context user (#17169) (#17172)
|
||||||
|
* Nicely handle missing user in collaborations (#17049) (#17166)
|
||||||
|
* Add Horizontal scrollbar to inner menu on Chrome (#17086) (#17164)
|
||||||
|
* Fix wrong i18n keys (#17150) (#17153)
|
||||||
|
* Fix Archive Creation: correct transaction ending (#17151)
|
||||||
|
* Prevent panic in Org mode HighlightCodeBlock (#17140) (#17141)
|
||||||
|
* Create doctor command to fix repo_units broken by dumps from 1.14.3-1.14.6 (#17136) (#17137)
|
||||||
|
|
||||||
|
[1.22.5]
|
||||||
|
* Update Gitea to 1.15.5
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.5)
|
||||||
|
* Upgrade Bluemonday to v1.0.16 (#17372) (#17374)
|
||||||
|
* Ensure correct SSH permissions check for private and restricted users (#17370) (#17373)
|
||||||
|
* Prevent NPE in CSV diff rendering when column removed (#17018) (#17377)
|
||||||
|
* Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH (#17281) (#17376)
|
||||||
|
* Don't panic if we fail to parse U2FRegistration data (#17304) (#17371)
|
||||||
|
* Ensure popup text is aligned left (backport for 1.15) (#17343)
|
||||||
|
* Ensure that git daemon export ok is created for mirrors (#17243) (#17306)
|
||||||
|
* Disable core.protectNTFS (#17300) (#17302)
|
||||||
|
* Use pointer for wrappedConn methods (#17295) (#17296)
|
||||||
|
* AutoRegistration is supposed to be working with disabled registration (backport) (#17292)
|
||||||
|
* Handle duplicate keys on GPG key ring (#17242) (#17284)
|
||||||
|
* Fix SVG side by side comparison link (#17375) (#17391)
|
||||||
|
|
||||||
|
[1.22.6]
|
||||||
|
* Update Gitea to 1.15.6
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.6)
|
||||||
|
* Prevent panic in serv.go with Deploy Keys (#17434) (#17435)
|
||||||
|
* Fix CSV render error (#17406) (#17431)
|
||||||
|
* Read expected buffer size (#17409) (#17430)
|
||||||
|
* Ensure that restricted users can access repos for which they are members (#17460) (#17464)
|
||||||
|
* Make commit-statuses popup show correctly (#17447) (#17466)
|
||||||
|
|
||||||
|
[1.23.0]
|
||||||
|
* Update Gitea to 1.15.7
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.7)
|
||||||
|
* Enable rendering of jupyter notebooks, rst, asciidoc by default
|
||||||
|
* Only allow webhook to send requests to allowed hosts (#17482) (#17510)
|
||||||
|
* Fix login redirection links (#17451) (#17473)
|
||||||
|
|
||||||
|
[1.23.1]
|
||||||
|
* Update Gitea to 1.15.8
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.8)
|
||||||
|
* Move POST /{username}/action/{action} to simply POST /{username} (#18045) (#18046)
|
||||||
|
* Fix delete u2f keys bug (#18040) (#18042)
|
||||||
|
* Reset Session ID on login (#18018) (#18041)
|
||||||
|
* Prevent off-by-one error on comments on newly appended lines (#18029) (#18035)
|
||||||
|
* Stop printing 03d after escaped characters in logs (#18030) (#18034)
|
||||||
|
|
||||||
|
[1.23.2]
|
||||||
|
* Update Gitea to 1.15.9
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.9)
|
||||||
|
* Fix wrong redirect on org labels (#18128) (#18134)
|
||||||
|
* Fix: unstable sort skips/duplicates issues across pages (#18094) (#18095)
|
||||||
|
* Revert "Fix delete u2f keys bug (#18042)" (#18107)
|
||||||
|
* Migrating wiki don't require token, so we should move it out of the require form (#17645) (#18104)
|
||||||
|
* Prevent NPE if gitea uploader fails to open url (#18080) (#18101)
|
||||||
|
* Reset locale on login (#17734) (#18100)
|
||||||
|
* Correctly handle failed migrations (#17575) (#18099)
|
||||||
|
* Instead of using routerCtx just escape the url before routing (#18086) (#18098)
|
||||||
|
* Quote references to the user table in consistency checks (#18072) (#18073)
|
||||||
|
* Add NotFound handler (#18062) (#18067)
|
||||||
|
* Ensure that git repository is closed before transfer (#18049) (#18057)
|
||||||
|
* Use common sessioner for API and web routes (#18114)
|
||||||
|
|
||||||
|
[1.23.3]
|
||||||
|
* Update Gitea to 1.15.10
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.15.10)
|
||||||
|
* Fix inconsistent PR comment counts (#18260) (#18261)
|
||||||
|
* Fix release link broken (#18252) (#18253)
|
||||||
|
* Fix update user from site administration page bug (#18250) (#18251)
|
||||||
|
* Set HeadCommit when creating tags (#18116) (#18173)
|
||||||
|
* Use correct translation key for error messages due to max repo limits (#18135 & #18153) (#18152)
|
||||||
|
* Fix purple color in suggested label colors (#18241) (#18242)
|
||||||
|
* Bump mermaid from 8.10.1 to 8.13.8 (#18198) (#18206)
|
||||||
|
|
||||||
|
[1.23.4]
|
||||||
|
* Update Gitea to 1.16.0
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.0)
|
||||||
|
|
||||||
|
[1.23.5]
|
||||||
|
* Update Gitea to 1.16.1
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.1)
|
||||||
|
* Update JS dependencies, fix lint (#18389) (#18540)
|
||||||
|
* Add dropdown icon to label set template dropdown (#18564) (#18571)
|
||||||
|
* Comments on migrated issues/prs must link to the comment ID (#18630) (#18637)
|
||||||
|
* Stop logging an error when notes are not found (#18626) (#18635)
|
||||||
|
* Ensure that blob-excerpt links work for wiki (#18587) (#18624)
|
||||||
|
* Only attempt to flush queue if the underlying worker pool is not finished (#18593) (#18620)
|
||||||
|
|
||||||
|
[1.23.6]
|
||||||
|
* Update Gitea to 1.16.2
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.2)
|
||||||
|
* Show fullname on issue edits and gpg/ssh signing info (#18828)
|
||||||
|
* Immediately Hammer if second kill is sent (#18823) (#18826)
|
||||||
|
* Allow mermaid render error to wrap (#18791)
|
||||||
|
|
||||||
|
[1.23.7]
|
||||||
|
* Update Gitea to 1.16.3
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.3)
|
||||||
|
|
||||||
|
[1.23.8]
|
||||||
|
* Update Gitea to 1.16.4
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.4)
|
||||||
|
* Restrict email address validation (#17688) (#19085)
|
||||||
|
* Fix lfs bug (#19072) (#19080)
|
||||||
|
|
||||||
|
[1.23.9]
|
||||||
|
* Update Gitea to 1.16.5
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.5)
|
||||||
|
* Prevent redirect to Host (2) (#19175) (#19186)
|
||||||
|
* Try to prevent autolinking of displaynames by email readers (#19169) (#19183)
|
||||||
|
* Clean paths when looking in Storage (#19124) (#19179)
|
||||||
|
* Do not send notification emails to inactive users (#19131) (#19139)
|
||||||
|
* Do not send activation email if manual confirm is set (#19119) (#19122)
|
||||||
|
|
||||||
|
[1.23.10]
|
||||||
|
* Update Gitea to 1.16.6
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.6)
|
||||||
|
|
||||||
|
[1.23.11]
|
||||||
|
* Update Gitea to 1.16.7
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.7)
|
||||||
|
* Escape git fetch remote (#19487) (#19490)
|
||||||
|
* On Migrations, only write commit-graph if wiki clone was successful (#19563) (#19568)
|
||||||
|
* Respect DefaultUserIsRestricted system default when creating new user (#19310) (#19560)
|
||||||
|
* Don't error when branch's commit doesn't exist (#19547) (#19548)
|
||||||
|
* Support hostname:port to pass host matcher's check (#19543) (#19544)
|
||||||
|
* Prevent dangling archiver goroutine (#19516) (#19526)
|
||||||
|
* Fix migrate release from github (#19510) (#19523)
|
||||||
|
* When view `_Siderbar` or `_Footer`, just display once (#19501) (#19522)
|
||||||
|
* Fix blame page select range error and some typos (#19503)
|
||||||
|
* Fix name of doctor fix "authorized-keys" in hints (#19464) (#19484)
|
||||||
|
* User specific repoID or xorm builder conditions for issue search (#19475) (#19476)
|
||||||
|
* Prevent dangling cat-file calls (goroutine alternative) (#19454) (#19466)
|
||||||
|
* RepoAssignment ensure to close before overwrite (#19449) (#19460)
|
||||||
|
* Set correct PR status on 3way on conflict checking (#19457) (#19458)
|
||||||
|
* Mark TemplateLoading error as "UnprocessableEntity" (#19445) (#19446)
|
||||||
|
|
||||||
|
[1.23.12]
|
||||||
|
* Update Gitea to 1.16.8
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.16.8)
|
||||||
|
* Add doctor check/fix for bogus action rows (#19656) (#19669)
|
||||||
|
* Make .cs highlighting legible on dark themes (#19604) (#19605)
|
||||||
|
* Delete user related oauth stuff on user deletion too (#19677) (#19680)
|
||||||
|
* Fix new release from tags list UI (#19670) (#19673)
|
||||||
|
* Prevent NPE when checking repo units if the user is nil (#19625) (#19630)
|
||||||
|
|
||||||
|
[1.24.0]
|
||||||
|
* Update Gitea to 1.17.0
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.17.0)
|
||||||
|
* Automatically render wiki TOC (#19873)
|
||||||
|
* Adding button to link accounts from user settings (#19792)
|
||||||
|
* Allow set default merge style while creating repo (#19751)
|
||||||
|
* Auto merge pull requests when all checks succeeded (#9307 & #19648)
|
||||||
|
* Improve reviewing PR UX (#19612)
|
||||||
|
* Add support for rendering console output with colors (#19497)
|
||||||
|
|
||||||
|
[1.24.1]
|
||||||
|
* Update Gitea to 1.17.1
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.17.1)
|
||||||
|
* Correctly escape within tribute.js (#20831) (#20832)
|
||||||
|
* Add support for NuGet API keys (#20721) (#20734)
|
||||||
|
* Display project in issue list (#20583)
|
||||||
|
* Add disable download source configuration (#20548) (#20579)
|
||||||
|
* Add username check to doctor (#20140) (#20671)
|
||||||
|
* Enable Wire 2 for Internal SSH Server (#20616) (#20617)
|
||||||
|
* Use the total issue count for UI (#20785) (#20827)
|
||||||
|
* Add proxy host into allow list (#20798) (#20819)
|
||||||
|
* Add missing translation for queue flush workers (#20791) (#20792)
|
||||||
|
* Improve comment header for mobile (#20781) (#20789)
|
||||||
|
* Fix git.Init for doctor sub-command (#20782) (#20783)
|
||||||
|
* Check webhooks slice length before calling xorm (#20642) (#20768)
|
||||||
|
* Remove manual rollback for failed generated repositories (#20639) (#20762)
|
||||||
|
* Use correct field name in npm template (#20675) (#20760)
|
||||||
|
* Keep download count on Container tag overwrite (#20728) (#20735)
|
||||||
|
* Fix v220 migration to be compatible for MSSQL 2008 r2 (#20702) (#20707)
|
||||||
|
* Use request timeout for git service rpc (#20689) (#20693)
|
||||||
|
* Send correct NuGet status codes (#20647) (#20677)
|
||||||
|
* Use correct context to get package content (#20673) (#20676)
|
||||||
|
* Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584) (#20663)
|
||||||
|
* Add default commit messages to PR for squash merge (#20618) (#20645)
|
||||||
|
* Fix package upload for files >32mb (#20622) (#20635)
|
||||||
|
* Fix the new-line copy-paste for rendered code (#20612)
|
||||||
|
* Clean up and fix clone button script (#20415 & #20600) (#20599)
|
||||||
|
* Fix default merge style (#20564) (#20565)
|
||||||
|
* Add repository condition for issue count (#20454) (#20496)
|
||||||
|
* Make branch icon stand out more (#20726) (#20774)
|
||||||
|
* Fix loading button with invalid form (#20754) (#20759)
|
||||||
|
* Fix SecToTime edge-cases (#20610) (#20611)
|
||||||
|
* Executable check always returns true for windows (#20637) (#20835)
|
||||||
|
* Check issue labels slice length before calling xorm Insert (#20655) (#20836)
|
||||||
|
* Fix owners cannot create organization repos bug (#20841) (#20854)
|
||||||
|
* Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839) (#20848)
|
||||||
|
|
||||||
|
[1.24.2]
|
||||||
|
* Update Gitea to 1.17.2
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.17.2)
|
||||||
|
* Double check CloneURL is acceptable (#20869) (#20892)
|
||||||
|
* Add more checks in migration code (#21011) (#21050)
|
||||||
|
* Fix hard-coded timeout and error panic in API archive download endpoint (#20925) (#21051)
|
||||||
|
* Improve arc-green code theme (#21039) (#21042)
|
||||||
|
* Enable contenthash in filename for dynamic assets (#20813) (#20932)
|
||||||
|
* Don't open new page for ext wiki on same repository (#20725) (#20910)
|
||||||
|
* Disable doctor logging on panic (#20847) (#20898)
|
||||||
|
* Remove calls to load Mirrors in user.Dashboard (#20855) (#20897)
|
||||||
|
* Update codemirror to 5.65.8 (#20875)
|
||||||
|
* Rework repo buttons (#20602, #20718) (#20719)
|
||||||
|
* Ensure delete user deletes all comments (#21067) (#21068)
|
||||||
|
* Delete unreferenced packages when deleting a package version (#20977) (#21060)
|
||||||
|
* Redirect if user does not exist on admin pages (#20981) (#21059)
|
||||||
|
* Set uploadpack.allowFilter etc on gitea serv to enable partial clones with ssh (#20902) (#21058)
|
||||||
|
* Fix 500 on time in timeline API (#21052) (#21057)
|
||||||
|
* Fill the specified ref in webhook test payload (#20961) (#21055)
|
||||||
|
* Add another index for Action table on postgres (#21033) (#21054)
|
||||||
|
* Fix broken insecureskipverify handling in redis connection uris (#20967) (#21053)
|
||||||
|
* Add Dev, Peer and Optional dependencies to npm PackageMetadataVersion (#21017) (#21044)
|
||||||
|
* Do not add links to Posters or Assignees with ID < 0 (#20577) (#21037)
|
||||||
|
* Fix modified due date message (#20388) (#21032)
|
||||||
|
* Fix missed sort bug (#21006)
|
||||||
|
* Fix input.value attr for RequiredClaimName/Value (#20946) (#21001)
|
||||||
|
* Change review buttons to icons to make space for text (#20934) (#20978)
|
||||||
|
* Fix download archiver of a commit (#20962) (#20971)
|
||||||
|
* Return 404 NotFound if requested attachment does not exist (#20886) (#20941)
|
||||||
|
* Set no-tags in git fetch on compare (#20893) (#20936)
|
||||||
|
* Allow multiple metadata files for Maven packages (#20674) (#20916)
|
||||||
|
* Increase Content field size of gpg_key and public_key to MEDIUMTEXT (#20896) (#20911)
|
||||||
|
* Fix mirror address setting not working (#20850) (#20904)
|
||||||
|
* Fix push mirror address backend get error Address cause setting page display error (#20593) (#20901)
|
||||||
|
* Fix panic when an invalid oauth2 name is passed (#20820) (#20900)
|
||||||
|
* In PushMirrorsIterate and MirrorsIterate if limit is negative do not set it (#20837) (#20899)
|
||||||
|
* Ensure that graceful start-up is informed of unused SSH listener (#20877) (#20888)
|
||||||
|
* Pad GPG Key ID with preceding zeroes (#20878) (#20885)
|
||||||
|
* Fix SQL Query for SearchTeam (#20844) (#20872)
|
||||||
|
* Fix the mode of custom dir to 0700 in docker-rootless (#20861) (#20867)
|
||||||
|
* Fix UI mis-align for PR commit history (#20845) (#20859)
|
||||||
|
|
||||||
|
[1.24.3]
|
||||||
|
* Update Gitea to 1.17.3
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.17.3)
|
||||||
|
* SECURITY
|
||||||
|
* Sanitize and Escape refs in git backend (#21464) (#21463)
|
||||||
|
* Bump golang.org/x/text (#21412) (#21413)
|
||||||
|
* Update bluemonday (#21281) (#21287)
|
||||||
|
* ENHANCEMENTS
|
||||||
|
* Fix empty container layer history and UI (#21251) (#21278)
|
||||||
|
* Use en-US as fallback when using other default language (#21200) (#21256)
|
||||||
|
* Make the vscode clone link respect transport protocol (#20557) (#21128)
|
||||||
|
|
||||||
|
[1.24.4]
|
||||||
|
* Make email display name configurable
|
||||||
|
|
||||||
|
[1.24.5]
|
||||||
|
* Support autosigning via gnupg
|
||||||
|
|
||||||
|
[1.25.0]
|
||||||
|
* Update Gitea to 1.17.4
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.17.4)
|
||||||
|
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)
|
||||||
|
* Fix package access for admins and inactive users (#21580) (#21592)
|
||||||
|
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927)
|
||||||
|
* Fix vertical align of committer avatar rendered by email address (#21884) (#21919)
|
||||||
|
* Fix setting HTTP headers after write (#21833) (#21874)
|
||||||
|
* Ignore line anchor links with leading zeroes (#21728) (#21777)
|
||||||
|
* Enable Monaco automaticLayout (#21516)
|
||||||
|
|
||||||
|
[1.25.1]
|
||||||
|
* Trust reverse proxy IP
|
||||||
|
|
||||||
|
[1.26.0]
|
||||||
|
* Update Gitea to 1.18.0
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.18.0)
|
||||||
|
* Remove ReverseProxy authentication from the API (#22219) (#22251)
|
||||||
|
* Support Go Vulnerability Management (#21139)
|
||||||
|
* Forbid HTML string tooltips (#20935)
|
||||||
|
* Rework mailer settings (#18982)
|
||||||
|
* Remove U2F support (#20141)
|
||||||
|
* Refactor i18n to locale (#20153)
|
||||||
|
* Enable contenthash in filename for dynamic assets (#20813)
|
||||||
|
* And a lot more enhancements
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"id": "io.gitea.cloudronapp",
|
"id": "org.forgejo.cloudronapp",
|
||||||
"title": "Gitea",
|
"title": "Forgejo",
|
||||||
"author": "Gitea developers",
|
"author": "Forgejo developers",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A painless self-hosted Git Service",
|
"tagline": "Beyond coding. We forge.",
|
||||||
"version": "1.21.4",
|
"version": "1.26.0",
|
||||||
|
"upstreamVersion": "v1.18.2-1",
|
||||||
"healthCheckPath": "/explore",
|
"healthCheckPath": "/explore",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
|
@ -22,21 +23,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"website": "https://gitea.io",
|
"website": "https://forgejo.org",
|
||||||
"contactEmail": "apps@cloudron.io",
|
"contactEmail": "apps@cloudron.io",
|
||||||
"icon": "file://logo.png",
|
"icon": "file://logo.png",
|
||||||
"optionalSso": true,
|
"optionalSso": true,
|
||||||
"mediaLinks": [
|
"mediaLinks": [],
|
||||||
"https://screenshots.cloudron.io/io.gitea.cloudronapp/1.png",
|
|
||||||
"https://screenshots.cloudron.io/io.gitea.cloudronapp/2.png",
|
|
||||||
"https://screenshots.cloudron.io/io.gitea.cloudronapp/3.png",
|
|
||||||
"https://screenshots.cloudron.io/io.gitea.cloudronapp/4.png",
|
|
||||||
"https://screenshots.cloudron.io/io.gitea.cloudronapp/5.png"
|
|
||||||
],
|
|
||||||
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ],
|
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ],
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "5.3.0",
|
"minBoxVersion": "7.2.0",
|
||||||
"forumUrl": "https://forum.cloudron.io/category/19/gitea",
|
"forumUrl": "https://forum.cloudron.io/category/19/gitea",
|
||||||
"documentationUrl": "https://docs.cloudron.io/apps/gitea/"
|
"documentationUrl": "https://docs.cloudron.io/apps/gitea/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
This app packages Gitea <upstream>1.14.4</upstream>
|
|
||||||
|
|
||||||
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
||||||
|
|
||||||
### Purpose
|
### Purpose
|
||||||
|
|
13
Dockerfile
13
Dockerfile
|
@ -1,9 +1,10 @@
|
||||||
FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92
|
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y openssh-server git && \
|
apt-get install -y openssh-server git asciidoctor pandoc && \
|
||||||
rm -rf /etc/ssh_host_* && \
|
rm -rf /etc/ssh_host_* && \
|
||||||
rm -r /var/cache/apt /var/lib/apt/lists
|
rm -r /var/cache/apt /var/lib/apt/lists
|
||||||
|
RUN pip3 install jupyter
|
||||||
|
|
||||||
ADD supervisor/ /etc/supervisor/conf.d/
|
ADD supervisor/ /etc/supervisor/conf.d/
|
||||||
|
|
||||||
|
@ -15,9 +16,12 @@ RUN passwd -d git
|
||||||
RUN mkdir -p /home/git/gitea
|
RUN mkdir -p /home/git/gitea
|
||||||
WORKDIR /home/git
|
WORKDIR /home/git
|
||||||
|
|
||||||
ARG VERSION=1.14.4
|
# for autosign feature
|
||||||
|
ENV GNUPGHOME="/app/data/gnupg"
|
||||||
|
|
||||||
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
ARG VERSION=7.0.0
|
||||||
|
|
||||||
|
RUN curl -L https://codeberg.org/forgejo/forgejo/releases/download/v${VERSION}/forgejo-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
&& chmod +x /home/git/gitea/gitea
|
&& chmod +x /home/git/gitea/gitea
|
||||||
|
|
||||||
# setup config paths
|
# setup config paths
|
||||||
|
@ -35,4 +39,3 @@ ADD start.sh /home/git/start.sh
|
||||||
COPY sshd_config /etc/ssh/sshd_config
|
COPY sshd_config /etc/ssh/sshd_config
|
||||||
|
|
||||||
CMD [ "/home/git/start.sh" ]
|
CMD [ "/home/git/start.sh" ]
|
||||||
|
|
||||||
|
|
23
README.md
23
README.md
|
@ -1,15 +1,23 @@
|
||||||
# Gitea Cloudron App
|
# Forgejo Cloudron App
|
||||||
|
|
||||||
This repository contains the Cloudron app package source for [Gitea](http://gitea.io/).
|
This repository contains the Cloudron app package source for [Forgejo](https://forgejo.org/).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp)
|
Using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
|
||||||
|
|
||||||
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
|
|
||||||
|
|
||||||
```
|
```
|
||||||
cloudron install --appstore-id io.gitea.cloudronapp
|
cloudron install --image rafaelcaricio/forgejo-cloudron-app:v7.0.0-1 --app code.caric.io
|
||||||
|
```
|
||||||
|
|
||||||
|
# Upgrading
|
||||||
|
|
||||||
|
Upgrade the `Dockerfile` with the version.
|
||||||
|
```
|
||||||
|
export VERSION=7.0.0
|
||||||
|
docker build --platform linux/amd64 -t "rafaelcaricio/forgejo-cloudron-app:v${VERSION}-1" .
|
||||||
|
docker push "rafaelcaricio/forgejo-cloudron-app:v${VERSION}-1"
|
||||||
|
cloudron update --image rafaelcaricio/forgejo-cloudron-app:v${VERSION}-1 --app code.caric.io --no-backup
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
@ -17,7 +25,7 @@ cloudron install --appstore-id io.gitea.cloudronapp
|
||||||
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
|
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
|
||||||
|
|
||||||
```
|
```
|
||||||
cd gitea-app
|
cd forgejo-app
|
||||||
|
|
||||||
cloudron build
|
cloudron build
|
||||||
cloudron install
|
cloudron install
|
||||||
|
@ -33,4 +41,3 @@ cd gitea-app/test
|
||||||
npm install
|
npm install
|
||||||
PATH=$PATH:node_modules/.bin USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
|
PATH=$PATH:node_modules/.bin USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,8 @@ SKIP_VERIFY = true
|
||||||
; those settings are protected and can't be modified
|
; those settings are protected and can't be modified
|
||||||
INSTALL_LOCK = true
|
INSTALL_LOCK = true
|
||||||
SECRET_KEY = ##SECRET_KEY
|
SECRET_KEY = ##SECRET_KEY
|
||||||
|
REVERSE_PROXY_LIMIT = 1
|
||||||
|
REVERSE_PROXY_TRUSTED_PROXIES = *
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
DISABLE_REGISTRATION = false
|
DISABLE_REGISTRATION = false
|
||||||
|
@ -103,3 +104,24 @@ COOKIE_SECURE = true
|
||||||
COOKIE_NAME = cloudron_gitea
|
COOKIE_NAME = cloudron_gitea
|
||||||
GC_INTERVAL_TIME = 2592000
|
GC_INTERVAL_TIME = 2592000
|
||||||
|
|
||||||
|
[markup.asciidoc]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .adoc,.asciidoc
|
||||||
|
RENDER_COMMAND = "asciidoctor -s -a showtitle --out-file=- -"
|
||||||
|
; Input is not a standard input but a file
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.restructuredtext]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .rst
|
||||||
|
RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst"
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.jupyter]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .ipynb
|
||||||
|
RENDER_COMMAND = "jupyter nbconvert --stdin --stdout --to html --template basic"
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.sanitizer.jupyter.img]
|
||||||
|
ALLOW_DATA_URI_IMAGES = true
|
||||||
|
|
BIN
logo.png
BIN
logo.png
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 6 KiB |
|
@ -5,6 +5,7 @@
|
||||||
Port 29418
|
Port 29418
|
||||||
# Use these options to restrict which interfaces/protocols sshd will bind to
|
# Use these options to restrict which interfaces/protocols sshd will bind to
|
||||||
ListenAddress 0.0.0.0
|
ListenAddress 0.0.0.0
|
||||||
|
ListenAddress ::
|
||||||
Protocol 2
|
Protocol 2
|
||||||
# HostKeys for protocol version 2
|
# HostKeys for protocol version 2
|
||||||
HostKey /app/data/sshd/ssh_host_rsa_key
|
HostKey /app/data/sshd/ssh_host_rsa_key
|
||||||
|
|
13
start.sh
13
start.sh
|
@ -7,15 +7,17 @@ mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
|
||||||
setup_ldap_source() {
|
setup_ldap_source() {
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "==> Setup LDAP source"
|
||||||
|
|
||||||
# Get the existing LDAP source status. This allows the user to disable LDAP
|
# Get the existing LDAP source status. This allows the user to disable LDAP
|
||||||
# Note that this method is deprecated since this app now supports optionalSso
|
# Note that this method is deprecated since this app now supports optionalSso
|
||||||
ldap_status=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
ldap_status=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "select is_active from login_source WHERE name='cloudron';")
|
||||||
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
||||||
|
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
|
|
||||||
if mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" \
|
if mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" \
|
||||||
-e "REPLACE INTO login_source (id, type, name, is_actived, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${CLOUDRON_LDAP_SERVER}\",\"Port\":${CLOUDRON_LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${CLOUDRON_LDAP_BIND_DN}\",\"BindPassword\":\"${CLOUDRON_LDAP_BIND_PASSWORD}\",\"UserBase\":\"${CLOUDRON_LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\"}','${now}','${now}');"; then
|
-e "REPLACE INTO login_source (id, type, name, is_active, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${CLOUDRON_LDAP_SERVER}\",\"Port\":${CLOUDRON_LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${CLOUDRON_LDAP_BIND_DN}\",\"BindPassword\":\"${CLOUDRON_LDAP_BIND_PASSWORD}\",\"UserBase\":\"${CLOUDRON_LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\"}','${now}','${now}');"; then
|
||||||
echo "==> LDAP Authentication was setup with activation status ${ldap_status}"
|
echo "==> LDAP Authentication was setup with activation status ${ldap_status}"
|
||||||
else
|
else
|
||||||
echo "==> Failed to setup LDAP authentication"
|
echo "==> Failed to setup LDAP authentication"
|
||||||
|
@ -26,7 +28,7 @@ setup_ldap_source() {
|
||||||
setup_root_user() {
|
setup_root_user() {
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if sudo -H -u git /home/git/gitea/gitea admin user create --name root --password changeme --email test@cloudron.io --admin -c /run/gitea/app.ini; then
|
if sudo -H -u git /home/git/gitea/gitea admin user create --username root --password changeme --email admin@cloudron.local --admin -c /run/gitea/app.ini; then
|
||||||
echo "==> root user added"
|
echo "==> root user added"
|
||||||
else
|
else
|
||||||
echo "==> Failed to add root user"
|
echo "==> Failed to add root user"
|
||||||
|
@ -115,16 +117,17 @@ crudini --set "/run/gitea/app.ini" mailer PASSWD "${CLOUDRON_MAIL_SMTP_PASSWORD}
|
||||||
crudini --set "/run/gitea/app.ini" mailer FROM "${CLOUDRON_MAIL_FROM}"
|
crudini --set "/run/gitea/app.ini" mailer FROM "${CLOUDRON_MAIL_FROM}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer SKIP_VERIFY "true"
|
crudini --set "/run/gitea/app.ini" mailer SKIP_VERIFY "true"
|
||||||
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
||||||
|
crudini --set "/run/gitea/app.ini" security REVERSE_PROXY_LIMIT 1
|
||||||
|
crudini --set "/run/gitea/app.ini" security REVERSE_PROXY_TRUSTED_PROXIES "*"
|
||||||
crudini --set "/run/gitea/app.ini" log MODE "console"
|
crudini --set "/run/gitea/app.ini" log MODE "console"
|
||||||
crudini --set "/run/gitea/app.ini" log ROOT_PATH "/run/gitea"
|
crudini --set "/run/gitea/app.ini" log ROOT_PATH "/run/gitea"
|
||||||
crudini --set "/run/gitea/app.ini" indexer ISSUE_INDEXER_PATH "/app/data/appdata/indexers/issues.bleve"
|
crudini --set "/run/gitea/app.ini" indexer ISSUE_INDEXER_PATH "/app/data/appdata/indexers/issues.bleve"
|
||||||
|
|
||||||
echo "==> Creating dirs and changing permissions"
|
echo "==> Creating dirs and changing permissions"
|
||||||
mkdir -p /app/data/repository /app/data/ssh /app/data/custom
|
mkdir -p /app/data/repository /app/data/ssh /app/data/custom /app/data/gnupg
|
||||||
chown -R git:git /app/data /run/gitea
|
chown -R git:git /app/data /run/gitea
|
||||||
|
|
||||||
# this expects app.ini to be available
|
# this expects app.ini to be available
|
||||||
( setup_auth ) &
|
( setup_auth ) &
|
||||||
|
|
||||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,3 @@ stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
|
2392
test/package-lock.json
generated
2392
test/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,11 +9,11 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^91.0.1",
|
"chromedriver": "^108.0.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^9.0.2",
|
"mocha": "^10.2.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"selenium-webdriver": "^3.6.0",
|
"selenium-webdriver": "^4.7.1",
|
||||||
"superagent": "^6.1.0"
|
"superagent": "^8.0.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
362
test/test.js
362
test/test.js
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/* jslint node:true */
|
/* jshint esversion: 8 */
|
||||||
/* global it:false */
|
/* global it:false */
|
||||||
/* global xit:false */
|
/* global xit:false */
|
||||||
/* global describe:false */
|
/* global describe:false */
|
||||||
|
@ -11,11 +11,10 @@
|
||||||
|
|
||||||
require('chromedriver');
|
require('chromedriver');
|
||||||
|
|
||||||
var execSync = require('child_process').execSync,
|
const execSync = require('child_process').execSync,
|
||||||
expect = require('expect.js'),
|
expect = require('expect.js'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
rimraf = require('rimraf'),
|
|
||||||
superagent = require('superagent'),
|
superagent = require('superagent'),
|
||||||
{ Builder, By, until } = require('selenium-webdriver'),
|
{ Builder, By, until } = require('selenium-webdriver'),
|
||||||
{ Options } = require('selenium-webdriver/chrome');
|
{ Options } = require('selenium-webdriver/chrome');
|
||||||
|
@ -49,252 +48,136 @@ describe('Application life cycle test', function () {
|
||||||
|
|
||||||
after(function () {
|
after(function () {
|
||||||
browser.quit();
|
browser.quit();
|
||||||
rimraf.sync(repodir);
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
function getAppInfo() {
|
function getAppInfo() {
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
|
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
||||||
|
|
||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAvatarOld(done) {
|
function sleep(millis) {
|
||||||
browser.get('https://' + app.fqdn + '/user/settings/avatar').then(function () {
|
return new Promise(resolve => setTimeout(resolve, millis));
|
||||||
return browser.findElement(By.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.xpath('//button[contains(text(), "Update Avatar Setting")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
if (app.manifest.version === '1.0.3') {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"updated successfully")]')), TIMEOUT);
|
|
||||||
} else {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"Your avatar setting has been updated.")]')), TIMEOUT);
|
|
||||||
}
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAvatar(done) {
|
async function setAvatar() {
|
||||||
if (app.manifest.version === '1.5.4') return setAvatarOld(done);
|
await browser.get('https://' + app.fqdn + '/user/settings');
|
||||||
|
|
||||||
browser.get('https://' + app.fqdn + '/user/settings').then(function () {
|
var button = await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]'));
|
||||||
var button = browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]'));
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]')).click();
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
||||||
return browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]')).click();
|
await browser.findElement(By.xpath('//button[contains(text(), "Update Avatar")]')).click();
|
||||||
}).then(function () {
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"Your avatar has been updated.")]')), TIMEOUT);
|
||||||
return browser.findElement(By.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.xpath('//button[contains(text(), "Update Avatar")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"Your avatar has been updated.")]')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkAvatar(done) {
|
async function checkAvatar() {
|
||||||
return done();
|
await browser.get(`https://${app.fqdn}/${username}`);
|
||||||
superagent.get('https://' + app.fqdn + '/avatars/a3e6f3316fc1738e29d621e6a26e93d3').end(function (error, result) {
|
|
||||||
expect(error).to.be(null);
|
const avatarSrc = await browser.findElement(By.xpath('//div[@id="profile-avatar"]/a/img')).getAttribute('src');
|
||||||
expect(result.statusCode).to.be(200);
|
|
||||||
done();
|
const response = await superagent.get(avatarSrc);
|
||||||
});
|
expect(response.statusCode).to.equal(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function login(username, password, done) {
|
async function login(username, password) {
|
||||||
browser.get('https://' + app.fqdn + '/user/login').then(function () {
|
await browser.get('https://' + app.fqdn + '/user/login');
|
||||||
return browser.findElement(By.id('user_name')).sendKeys(username);
|
|
||||||
}).then(function () {
|
await browser.findElement(By.id('user_name')).sendKeys(username);
|
||||||
return browser.findElement(By.id('password')).sendKeys(password);
|
await browser.findElement(By.id('password')).sendKeys(password);
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//form[@action="/user/login"]//button')).click();
|
||||||
return browser.findElement(By.tagName('form')).submit();
|
await browser.wait(until.elementLocated(By.xpath('//img[contains(@class, "avatar")]')), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(By.linkText('Dashboard')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function adminLogin(done) {
|
async function adminLogin() {
|
||||||
login('root', 'changeme', done);
|
await login('root', 'changeme');
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout(done) {
|
async function logout() {
|
||||||
browser.get('https://' + app.fqdn).then(function () {
|
await browser.get('https://' + app.fqdn);
|
||||||
return browser.findElement(By.xpath('//img[contains(@class, "avatar")]')).click();
|
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//img[contains(@class, "avatar")]')).click();
|
||||||
browser.sleep(2000);
|
await sleep(2000);
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//a[@data-url="/user/logout"]')).click();
|
||||||
return browser.findElement(By.xpath('//a[@data-url="/user/logout"]')).click();
|
await sleep(2000);
|
||||||
}).then(function () {
|
|
||||||
browser.sleep(2000);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPublicKey(done) {
|
async function addPublicKey() {
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
||||||
|
|
||||||
const sshPage = 'https://' + app.fqdn + '/user/settings/keys';
|
const sshPage = 'https://' + app.fqdn + '/user/settings/keys';
|
||||||
|
|
||||||
browser.get(sshPage).then(function () {
|
await browser.get(sshPage);
|
||||||
return browser.findElement(By.xpath('//div[text()="Add Key"]')).click();
|
|
||||||
}).then(function () {
|
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
||||||
return browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
await browser.findElement(By.id('add-ssh-button')).click();
|
||||||
}).then(function () {
|
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
||||||
return browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
||||||
}).then(function () {
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
await browser.findElement(By.xpath('//button[contains(text(), "Add Key")]')).click();
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.xpath('//button[contains(text(), "Add Key")]')).click();
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
if (app.manifest.version === '1.0.3') {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "added successfully!")]')), TIMEOUT);
|
|
||||||
} else {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
|
||||||
}
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createRepo(done) {
|
async function createRepo() {
|
||||||
var getRepoPage;
|
var getRepoPage = await browser.get('https://' + app.fqdn + '/repo/create');
|
||||||
if (app.manifest.version === '1.0.3') {
|
|
||||||
getRepoPage = browser.get('https://' + app.fqdn).then(function () {
|
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
||||||
return browser.findElement(By.linkText('New Repository')).click();
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
||||||
}).then(function () {
|
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
return browser.wait(until.elementLocated(By.xpath('//*[contains(text(), "New Repository")]')), TIMEOUT);
|
await browser.findElement(By.id('auto-init')).click();
|
||||||
|
await browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]')).click();
|
||||||
|
|
||||||
|
await browser.wait(function () {
|
||||||
|
return browser.getCurrentUrl().then(function (url) {
|
||||||
|
return url === 'https://' + app.fqdn + '/' + username + '/' + reponame;
|
||||||
});
|
});
|
||||||
} else {
|
}, TIMEOUT);
|
||||||
getRepoPage = browser.get('https://' + app.fqdn + '/repo/create');
|
|
||||||
}
|
|
||||||
|
|
||||||
getRepoPage.then(function () {
|
|
||||||
return browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
|
||||||
}).then(function () {
|
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.id('auto-init')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
browser.wait(function () {
|
|
||||||
return browser.getCurrentUrl().then(function (url) {
|
|
||||||
return url === 'https://' + app.fqdn + '/' + username + '/' + reponame;
|
|
||||||
});
|
|
||||||
}, TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkCloneUrl(done) {
|
async function checkCloneUrl() {
|
||||||
browser.get('https://' + app.fqdn + '/' + username + '/' + reponame).then(function () {
|
await browser.get('https://' + app.fqdn + '/' + username + '/' + reponame);
|
||||||
return browser.findElement(By.id('repo-clone-ssh')).click();
|
await browser.findElement(By.id('repo-clone-ssh')).click();
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(By.id('repo-clone-url')).getAttribute('value');
|
var cloneUrl = await browser.findElement(By.id('repo-clone-url')).getAttribute('value');
|
||||||
}).then(function (cloneUrl) {
|
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
|
||||||
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneRepo(done) {
|
function cloneRepo() {
|
||||||
rimraf.sync(repodir);
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
var env = Object.create(process.env);
|
var env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
||||||
done();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushFile(done) {
|
function pushFile() {
|
||||||
var env = Object.create(process.env);
|
const env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} master`,
|
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} main`,
|
||||||
{ env: env, cwd: repodir });
|
{ env: env, cwd: repodir });
|
||||||
rimraf.sync('/tmp/testrepo');
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
function addCustomFile(done) {
|
|
||||||
fs.writeFileSync('/tmp/customfile.txt', 'GOGS TEST', 'utf8');
|
|
||||||
execSync(`cloudron exec --app ${app.id} -- mkdir -p /app/data/custom/public`);
|
|
||||||
execSync(`cloudron push --app ${app.id} /tmp/customfile.txt /app/data/custom/public/customfile.txt`);
|
|
||||||
fs.unlinkSync('/tmp/customfile.txt');
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkCustomFile(done) {
|
|
||||||
superagent.get('https://' + app.fqdn + '/customfile.txt').end(function (error, result) {
|
|
||||||
if (error) return done(error);
|
|
||||||
|
|
||||||
expect(result.text).to.contain('GOGS TEST');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileExists() {
|
function fileExists() {
|
||||||
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
|
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMail(done) {
|
async function sendMail() {
|
||||||
browser.get(`https://${app.fqdn}/admin/config`).then(function () {
|
await browser.get(`https://${app.fqdn}/admin/config`);
|
||||||
var button = browser.findElement(By.xpath('//button[@id="test-mail-btn"]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
var button = await browser.findElement(By.xpath('//button[@id="test-mail-btn"]'));
|
||||||
}).then(function () {
|
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
return browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
|
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//button[@id="test-mail-btn"]')).click();
|
||||||
return browser.findElement(By.xpath('//button[@id="test-mail-btn"]')).click();
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"A testing email has been sent to \'test@cloudron.io\'")]')), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"A testing email has been sent to \'test@cloudron.io\'")]')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||||
|
|
||||||
// it('can login', function (done) {
|
|
||||||
// var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
|
|
||||||
// superagent.post(`https://${inspect.apiEndpoint}/api/v1/developer/login`).send({
|
|
||||||
// username: username,
|
|
||||||
// password: password
|
|
||||||
// }).end(function (error, result) {
|
|
||||||
// if (error) return done(error);
|
|
||||||
// if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
|
||||||
|
|
||||||
// token = result.body.accessToken;
|
|
||||||
|
|
||||||
// superagent.get(`https://${inspect.apiEndpoint}/api/v1/profile`)
|
|
||||||
// .query({ access_token: token }).end(function (error, result) {
|
|
||||||
// if (error) return done(error);
|
|
||||||
// if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
|
||||||
|
|
||||||
// email = result.body.email;
|
|
||||||
// done();
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
it('install app', function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
it('install app', function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('can get the main page', function (done) {
|
|
||||||
superagent.get('https://' + app.fqdn).end(function (error, result) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(result.status).to.eql(200);
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can admin login', adminLogin);
|
it('can admin login', adminLogin);
|
||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
|
@ -314,9 +197,6 @@ return done();
|
||||||
|
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can add custom file', addCustomFile);
|
|
||||||
it('can check custom file', checkCustomFile);
|
|
||||||
|
|
||||||
it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
|
it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
|
||||||
|
|
||||||
xit('can login', login.bind(null, username, password)); // no need to relogin since session persists
|
xit('can login', login.bind(null, username, password)); // no need to relogin since session persists
|
||||||
|
@ -332,18 +212,14 @@ return done();
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('move to different location', function (done) {
|
it('move to different location', async function () {
|
||||||
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
|
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
|
||||||
expect(app).to.be.an('object');
|
|
||||||
|
|
||||||
done();
|
execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', login.bind(null, username, password));
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
|
@ -351,57 +227,26 @@ return done();
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('uninstall app', function (done) {
|
it('uninstall app', async function () {
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// check if the _first_ login via email succeeds
|
|
||||||
it('can login via email', function (done) {
|
|
||||||
execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
||||||
expect(app).to.be.an('object');
|
|
||||||
|
|
||||||
login(email, password, function (error) {
|
|
||||||
if (error) return done(error);
|
|
||||||
|
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
|
||||||
browser.get('about:blank').then(function () {
|
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// No SSO
|
// No SSO
|
||||||
it('install app (no sso)', function () {
|
it('install app (no sso)', function () { execSync(`cloudron install --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
execSync(`cloudron install --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can get app information', function () {
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
||||||
|
|
||||||
expect(app).to.be.an('object');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
it('can get app information', getAppInfo);
|
||||||
it('can admin login (no sso)', adminLogin);
|
it('can admin login (no sso)', adminLogin);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('uninstall app (no sso)', function () {
|
it('uninstall app (no sso)', async function () {
|
||||||
|
await browser.get('about:blank');
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// test update
|
// test update
|
||||||
it('can install app', function () {
|
it('can install app', function () { execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', login.bind(null, username, password));
|
||||||
|
@ -412,24 +257,21 @@ return done();
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can update', function () {
|
it('can update', function () { execSync('cloudron update --app ' + app.id, EXEC_ARGS); });
|
||||||
execSync('cloudron update --app ' + app.id, EXEC_ARGS);
|
it('can get app information', getAppInfo);
|
||||||
});
|
|
||||||
|
|
||||||
xit('can admin login', adminLogin);
|
it('can admin login', adminLogin);
|
||||||
xit('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
xit('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', login.bind(null, username, password));
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in cloned repo', fileExists);
|
it('file exists in cloned repo', fileExists);
|
||||||
|
|
||||||
it('uninstall app', function (done) {
|
it('uninstall app', async function () {
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue