1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-26 15:07:25 +00:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Johannes Zellner
0008351e7c Fixup tests 2021-08-23 13:10:31 +02:00
Johannes Zellner
0aab01b926 Update test deps 2021-08-23 11:17:41 +02:00
Johannes Zellner
2877b4e599 Bump version for 1.15.0 2021-08-23 11:17:23 +02:00
Girish Ramakrishnan
f5f690ebd9 Version 1.21.6 2021-08-06 10:12:10 -07:00
Girish Ramakrishnan
4a5bf98d60 Update test packages 2021-08-06 10:00:52 -07:00
Girish Ramakrishnan
3e84ab8730 Update gitea to 1.14.6 2021-08-05 10:47:29 -07:00
Johannes Zellner
c0d7b41a77 Bump version for 1.14.5 2021-07-16 11:12:03 +02:00
Johannes Zellner
df77df2347 Update test deps 2021-07-06 15:30:30 +02:00
Johannes Zellner
f18b11626c Bump version for 1.14.4 2021-07-06 15:29:52 +02:00
7 changed files with 214 additions and 302 deletions

View File

@@ -748,3 +748,38 @@
* Add missing SameSite settings for the i_like_gitea cookie (#16037) (#16039) * Add missing SameSite settings for the i_like_gitea cookie (#16037) (#16039)
* Fix setting of SameSite on cookies (#15989) (#15991) * Fix setting of SameSite on cookies (#15989) (#15991)
[1.21.4]
* Update Gitea to 1.14.4
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.14.4)
* Fix relative links in postprocessed images (#16334) (#16340)
* Fix list_options GetStartEnd (#16303) (#16305)
* Fix API to use author for commits instead of committer (#16276) (#16277)
* Handle misencoding of login_source cfg in mssql (#16268) (#16275)
* Fixed issues not updated by commits (#16254) (#16261)
* Improve efficiency in FindRenderizableReferenceNumeric and getReference (#16251) (#16255)
* Use html.Parse rather than html.ParseFragment (#16223) (#16225)
* Fix milestone counters on new issue (#16183) (#16224)
* 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)

View File

@@ -4,7 +4,7 @@
"author": "Gitea developers", "author": "Gitea developers",
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"tagline": "A painless self-hosted Git Service", "tagline": "A painless self-hosted Git Service",
"version": "1.21.3", "version": "1.22.0",
"healthCheckPath": "/explore", "healthCheckPath": "/explore",
"httpPort": 3000, "httpPort": 3000,
"memoryLimit": 536870912, "memoryLimit": 536870912,

View File

@@ -1,4 +1,4 @@
This app packages Gitea <upstream>1.14.3</upstream> This app packages Gitea <upstream>1.15.0</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.

View File

@@ -15,7 +15,7 @@ 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.3 ARG VERSION=1.15.0
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \ RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
&& chmod +x /home/git/gitea/gitea && chmod +x /home/git/gitea/gitea

128
test/package-lock.json generated
View File

@@ -19,9 +19,9 @@
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="
}, },
"@nodelib/fs.walk": { "@nodelib/fs.walk": {
"version": "1.2.7", "version": "1.2.8",
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"requires": { "requires": {
"@nodelib/fs.scandir": "2.1.5", "@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0" "fastq": "^1.6.0"
@@ -33,15 +33,15 @@
"integrity": "sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw==" "integrity": "sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw=="
}, },
"@types/node": { "@types/node": {
"version": "15.12.4", "version": "16.4.13",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz",
"integrity": "sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA==", "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg==",
"optional": true "optional": true
}, },
"@types/yauzl": { "@types/yauzl": {
"version": "2.9.1", "version": "2.9.2",
"resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz",
"integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", "integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==",
"optional": true, "optional": true,
"requires": { "requires": {
"@types/node": "*" "@types/node": "*"
@@ -162,9 +162,9 @@
"integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg=="
}, },
"chalk": { "chalk": {
"version": "4.1.1", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"requires": { "requires": {
"ansi-styles": "^4.1.0", "ansi-styles": "^4.1.0",
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
@@ -181,24 +181,24 @@
} }
}, },
"chokidar": { "chokidar": {
"version": "3.5.1", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"requires": { "requires": {
"anymatch": "~3.1.1", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
"fsevents": "~2.3.1", "fsevents": "~2.3.2",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
"normalize-path": "~3.0.0", "normalize-path": "~3.0.0",
"readdirp": "~3.5.0" "readdirp": "~3.6.0"
} }
}, },
"chromedriver": { "chromedriver": {
"version": "91.0.1", "version": "92.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-91.0.1.tgz", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-92.0.1.tgz",
"integrity": "sha512-9LktpHiUxM4UWUsr+jI1K1YKx2GENt6BKKJ2mibPj1Wc6ODzX/3fFIlr8CZ4Ftuyga+dHTTbAyPWKwKvybEbKA==", "integrity": "sha512-LptlDVCs1GgyFNVbRoHzzy948JDVzTgGiVPXjNj385qXKQP3hjAVBIgyvb/Hco0xSEW8fjwJfsm1eQRmu6t4pQ==",
"requires": { "requires": {
"@testim/chrome-version": "^1.0.7", "@testim/chrome-version": "^1.0.7",
"axios": "^0.21.1", "axios": "^0.21.1",
@@ -296,9 +296,9 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
}, },
"debug": { "debug": {
"version": "4.3.1", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"requires": { "requires": {
"ms": "2.1.2" "ms": "2.1.2"
} }
@@ -421,16 +421,15 @@
} }
}, },
"fast-glob": { "fast-glob": {
"version": "3.2.5", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz",
"integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==",
"requires": { "requires": {
"@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3", "@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.0", "glob-parent": "^5.1.2",
"merge2": "^1.3.0", "merge2": "^1.3.0",
"micromatch": "^4.0.2", "micromatch": "^4.0.4"
"picomatch": "^2.2.1"
} }
}, },
"fast-safe-stringify": { "fast-safe-stringify": {
@@ -439,9 +438,9 @@
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
}, },
"fastq": { "fastq": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz",
"integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==",
"requires": { "requires": {
"reusify": "^1.0.4" "reusify": "^1.0.4"
} }
@@ -560,9 +559,9 @@
} }
}, },
"graceful-fs": { "graceful-fs": {
"version": "4.2.6", "version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
}, },
"growl": { "growl": {
"version": "1.10.5", "version": "1.10.5",
@@ -851,14 +850,14 @@
} }
}, },
"mocha": { "mocha": {
"version": "9.0.1", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.1.tgz", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.0.tgz",
"integrity": "sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw==", "integrity": "sha512-Kjg/XxYOFFUi0h/FwMOeb6RoroiZ+P1yOfya6NK7h3dNhahrJx1r2XIT3ge4ZQvJM86mdjNA+W5phqRQh7DwCg==",
"requires": { "requires": {
"@ungap/promise-all-settled": "1.1.2", "@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1", "ansi-colors": "4.1.1",
"browser-stdout": "1.3.1", "browser-stdout": "1.3.1",
"chokidar": "3.5.1", "chokidar": "3.5.2",
"debug": "4.3.1", "debug": "4.3.1",
"diff": "5.0.0", "diff": "5.0.0",
"escape-string-regexp": "4.0.0", "escape-string-regexp": "4.0.0",
@@ -871,17 +870,32 @@
"minimatch": "3.0.4", "minimatch": "3.0.4",
"ms": "2.1.3", "ms": "2.1.3",
"nanoid": "3.1.23", "nanoid": "3.1.23",
"serialize-javascript": "5.0.1", "serialize-javascript": "6.0.0",
"strip-json-comments": "3.1.1", "strip-json-comments": "3.1.1",
"supports-color": "8.1.1", "supports-color": "8.1.1",
"which": "2.0.2", "which": "2.0.2",
"wide-align": "1.1.3", "wide-align": "1.1.3",
"workerpool": "6.1.4", "workerpool": "6.1.5",
"yargs": "16.2.0", "yargs": "16.2.0",
"yargs-parser": "20.2.4", "yargs-parser": "20.2.4",
"yargs-unparser": "2.0.0" "yargs-unparser": "2.0.0"
}, },
"dependencies": { "dependencies": {
"debug": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"glob": { "glob": {
"version": "7.1.7", "version": "7.1.7",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
@@ -1051,9 +1065,9 @@
} }
}, },
"readdirp": { "readdirp": {
"version": "3.5.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"requires": { "requires": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
} }
@@ -1121,9 +1135,9 @@
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
}, },
"serialize-javascript": { "serialize-javascript": {
"version": "5.0.1", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
"integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
"requires": { "requires": {
"randombytes": "^2.1.0" "randombytes": "^2.1.0"
} }
@@ -1241,6 +1255,16 @@
"requires": { "requires": {
"debug": "4.3.1", "debug": "4.3.1",
"is2": "^2.0.6" "is2": "^2.0.6"
},
"dependencies": {
"debug": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
}
}
} }
}, },
"tmp": { "tmp": {
@@ -1290,9 +1314,9 @@
} }
}, },
"workerpool": { "workerpool": {
"version": "6.1.4", "version": "6.1.5",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.4.tgz", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz",
"integrity": "sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g==" "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw=="
}, },
"wrap-ansi": { "wrap-ansi": {
"version": "7.0.0", "version": "7.0.0",

View File

@@ -9,9 +9,9 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^91.0.1", "chromedriver": "^92.0.1",
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^9.0.1", "mocha": "^9.1.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"selenium-webdriver": "^3.6.0", "selenium-webdriver": "^3.6.0",
"superagent": "^6.1.0" "superagent": "^6.1.0"

View File

@@ -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 */
@@ -54,247 +54,130 @@ describe('Application life cycle test', function () {
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); var avatarSrc = await browser.findElement(By.xpath('//a[@id="profile-avatar"]/img')).getAttribute('src');
expect(result.statusCode).to.be(200);
done(); var avatar = await superagent.get(avatarSrc);
}); expect(avatar.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.tagName('form')).submit();
return browser.findElement(By.tagName('form')).submit(); await browser.wait(until.elementLocated(By.linkText('Dashboard')), 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.findElement(By.xpath('//div[text()="Add Key"]')).click();
return browser.findElement(By.id('ssh-key-title')).sendKeys('testkey'); await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
}).then(function () { await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
return browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480 var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
}).then(function () { await browser.executeScript('arguments[0].scrollIntoView(false)', button);
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]')); await browser.findElement(By.xpath('//button[contains(text(), "Add Key")]')).click();
return browser.executeScript('arguments[0].scrollIntoView(false)', button);
}).then(function () { await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
return browser.findElement(By.xpath('//button[contains(text(), "Add Key")]')).click();
}).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); rimraf.sync(repodir);
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); var 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} master`,
{ env: env, cwd: repodir }); { env: env, cwd: repodir });
rimraf.sync('/tmp/testrepo'); rimraf.sync('/tmp/testrepo');
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,38 @@ 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 // check if the _first_ login via email succeeds
it('can login via email', function (done) { it('can login via email', async function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
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]; it('can get app information', getAppInfo);
expect(app).to.be.an('object'); it('can login', login.bind(null, email, password));
login(email, password, function (error) { it('uninstall app', async function () {
if (error) return done(error); // ensure we don't hit NXDOMAIN in the mean time
await browser.get('about:blank');
// ensure we don't hit NXDOMAIN in the mean time execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
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,9 +269,7 @@ 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);
});
xit('can admin login', adminLogin); xit('can admin login', adminLogin);
xit('can send mail', sendMail); xit('can send mail', sendMail);
@@ -425,11 +280,9 @@ return done();
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();
});
}); });
}); });