mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-26 15:07:25 +00:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d0c1e65913 | ||
|
88732c63c9 | ||
|
d62cca74cc | ||
|
f96533530f | ||
|
3e95af2256 | ||
|
90693772de | ||
|
092f2089f2 | ||
|
16ffe8295f | ||
|
61d2691859 | ||
|
19c4b2a7ff | ||
|
5c7c228ff4 | ||
|
62b03b02d5 | ||
|
7dd4447091 | ||
|
d23339e2e3 | ||
|
32daf79b3b | ||
|
2d0a1f14e6 | ||
|
bbae02fa50 | ||
|
e176d6c705 |
70
CHANGELOG.md
70
CHANGELOG.md
@@ -1342,3 +1342,73 @@
|
|||||||
* Fix being unable to use a repo that prohibits accepting PRs as a PR source. (#26785) (#26790)
|
* Fix being unable to use a repo that prohibits accepting PRs as a PR source. (#26785) (#26790)
|
||||||
* Fix Page Not Found error (#26768)
|
* Fix Page Not Found error (#26768)
|
||||||
|
|
||||||
|
[1.30.0]
|
||||||
|
* Implement OIDC auth
|
||||||
|
|
||||||
|
[1.30.1]
|
||||||
|
* Update Gitea to 1.20.5
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.20.5)
|
||||||
|
* Fix z-index on markdown completion (#27237) (#27242 & #27238)
|
||||||
|
* Use secure cookie for HTTPS sites (#26999) (#27013)
|
||||||
|
* Fix git 2.11 error when checking IsEmpty (#27393) (#27396)
|
||||||
|
* Allow get release download files and lfs files with oauth2 token format (#26430) (#27378)
|
||||||
|
* Fix orphan check for deleted branch (#27310) (#27320)
|
||||||
|
* Quote table release in sql queries (#27205) (#27219)
|
||||||
|
* Fix release URL in webhooks (#27182) (#27184)
|
||||||
|
* Fix successful return value for SyncAndGetUserSpecificDiff (#27152) (#27156)
|
||||||
|
* fix pagination for followers and following (#27127) (#27138)
|
||||||
|
* Fix issue templates when blank isses are disabled (#27061) (#27082)
|
||||||
|
* Fix context cache bug & enable context cache for dashabord commits' authors(#26991) (#27017)
|
||||||
|
* Fix INI parsing for value with trailing slash (#26995) (#27001)
|
||||||
|
* Fix PushEvent NullPointerException jenkinsci/github-plugin (#27203) (#27249)
|
||||||
|
* Fix organization field being null in POST /orgs/{orgid}/teams (#27150) (#27167 & #27162)
|
||||||
|
* Fix bug of review request number (#27406) (#27104)
|
||||||
|
|
||||||
|
[1.31.0]
|
||||||
|
* Update base image to 4.2.0
|
||||||
|
|
||||||
|
[1.32.0]
|
||||||
|
* Update Gitea to 1.21.0
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.21.0)
|
||||||
|
|
||||||
|
[1.32.1]
|
||||||
|
* Update Gitea to 1.21.1
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.21.1)
|
||||||
|
|
||||||
|
[1.32.2]
|
||||||
|
* Update Gitea to 1.21.2
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.21.2)
|
||||||
|
* Rebuild with recently released golang version
|
||||||
|
* Fix missing check (#28406) (#28411)
|
||||||
|
* Do some missing checks (#28423) (#28432)
|
||||||
|
* Fix margin in server signed signature verification view (#28379) (#28381)
|
||||||
|
* Fix object does not exist error when checking citation file (#28314) (#28369)
|
||||||
|
* Use filepath instead of path to create SQLite3 database file (#28374) (#28378)
|
||||||
|
* Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (#28359) (#28365)
|
||||||
|
* Handle repository.size column being NULL in migration v263 (#28336) (#28363)
|
||||||
|
* Convert git commit summary to valid UTF8. (#28356) (#28358)
|
||||||
|
* Fix migration panic due to an empty review comment diff (#28334) (#28362)
|
||||||
|
* Add HEAD support for rpm repo files (#28309) (#28360)
|
||||||
|
* Fix RPM/Debian signature key creation (#28352) (#28353)
|
||||||
|
* Keep profile tab when clicking on Language (#28320) (#28331)
|
||||||
|
* Fix missing issue search index update when changing status (#28325) (#28330)
|
||||||
|
* Fix wrong link in protect_branch_name_pattern_desc (#28313) (#28315)
|
||||||
|
* Read previous info from git blame (#28306) (#28310)
|
||||||
|
* Ignore "non-existing" errors when getDirectorySize calculates the size (#28276) (#28285)
|
||||||
|
* Use appSubUrl for OAuth2 callback URL tip (#28266) (#28275)
|
||||||
|
* Meilisearch: require all query terms to be matched (#28293) (#28296)
|
||||||
|
* Fix required error for token name (#28267) (#28284)
|
||||||
|
* Fix issue will be detected as pull request when checking First-time contributor (#28237) (#28271)
|
||||||
|
* Use full width for project boards (#28225) (#28245)
|
||||||
|
* Increase "version" when update the setting value to a same value as before (#28243) (#28244)
|
||||||
|
* Also sync DB branches on push if necessary (#28361) (#28403)
|
||||||
|
* Make gogit Repository.GetBranchNames consistent (#28348) (#28386)
|
||||||
|
* Recover from panic in cron task (#28409) (#28425)
|
||||||
|
* Deprecate query string auth tokens (#28390) (#28430)
|
||||||
|
* Improve doctor cli behavior (#28422) (#28424)
|
||||||
|
* Fix margin in server signed signature verification view (#28379) (#28381)
|
||||||
|
* Refactor template empty checks (#28351) (#28354)
|
||||||
|
* Read previous info from git blame (#28306) (#28310)
|
||||||
|
* Use full width for project boards (#28225) (#28245)
|
||||||
|
* Enable system users search via the API (#28013) (#28018)
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
"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.29.4",
|
"version": "1.32.2",
|
||||||
"upstreamVersion": "1.20.4",
|
"upstreamVersion": "1.21.2",
|
||||||
"healthCheckPath": "/explore",
|
"healthCheckPath": "/explore",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"mysql": { },
|
"mysql": { },
|
||||||
"sendmail": { "supportsDisplayName": true },
|
"sendmail": { "supportsDisplayName": true },
|
||||||
"localstorage": { },
|
"localstorage": { },
|
||||||
"ldap": { }
|
"oidc": { "loginRedirectUri": "/user/oauth2/cloudron/callback" }
|
||||||
},
|
},
|
||||||
"tcpPorts": {
|
"tcpPorts": {
|
||||||
"SSH_PORT": {
|
"SSH_PORT": {
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ],
|
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ],
|
||||||
"changelog": "file://CHANGELOG.md",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "7.3.0",
|
"minBoxVersion": "7.5.1",
|
||||||
"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,4 +1,4 @@
|
|||||||
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
|
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y openssh-server git asciidoctor pandoc && \
|
apt-get install -y openssh-server git asciidoctor pandoc && \
|
||||||
@@ -19,7 +19,7 @@ WORKDIR /home/git
|
|||||||
# for autosign feature
|
# for autosign feature
|
||||||
ENV GNUPGHOME="/app/data/gnupg"
|
ENV GNUPGHOME="/app/data/gnupg"
|
||||||
|
|
||||||
ARG VERSION=1.20.4
|
ARG VERSION=1.21.2
|
||||||
|
|
||||||
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
|
||||||
|
@@ -48,6 +48,11 @@ ENABLED = true
|
|||||||
; APP_DATA_PATH/attachments
|
; APP_DATA_PATH/attachments
|
||||||
PATH =
|
PATH =
|
||||||
|
|
||||||
|
[oauth2_client]
|
||||||
|
ENABLE_AUTO_REGISTRATION = true
|
||||||
|
USERNAME = sub
|
||||||
|
UPDATE_AVATAR = false
|
||||||
|
ACCOUNT_LINKING = auto
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
|
31
start.sh
31
start.sh
@@ -4,25 +4,23 @@ set -eu -o pipefail
|
|||||||
|
|
||||||
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
|
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
|
||||||
|
|
||||||
setup_ldap_source() {
|
migrate_ldap_users_to_oidc() {
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo "==> Setup LDAP source"
|
echo "==> migrate LDAP to OIDC"
|
||||||
|
mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e \
|
||||||
|
"UPDATE user u, (select id from login_source WHERE name='cloudron' and type='6') ls SET u.login_type=6, u.login_source=ls.id WHERE u.login_type=2 AND u.login_source=1"
|
||||||
|
}
|
||||||
|
|
||||||
# Get the existing LDAP source status. This allows the user to disable LDAP
|
setup_oidc_source() {
|
||||||
# Note that this method is deprecated since this app now supports optionalSso
|
set -eu
|
||||||
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"
|
echo "==> Setup OIDC source"
|
||||||
|
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
|
mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -e \
|
||||||
|
"REPLACE INTO login_source (id, type, name, is_active, cfg, created_unix, updated_unix) VALUES (1,6,'cloudron', 1,'{\"Provider\":\"openidConnect\",\"ClientID\":\"${CLOUDRON_OIDC_CLIENT_ID}\",\"ClientSecret\":\"${CLOUDRON_OIDC_CLIENT_SECRET}\",\"OpenIDConnectAutoDiscoveryURL\":\"${CLOUDRON_OIDC_ISSUER}/.well-known/openid-configuration\",\"CustomURLMapping\":null,\"IconURL\":\"\",\"Scopes\":[\"openid email profile\"],\"RequiredClaimName\":\"\",\"RequiredClaimValue\":\"\",\"GroupClaimName\":\"\",\"AdminGroup\":\"\",\"GroupTeamMap\":\"\",\"GroupTeamMapRemoval\":false,\"RestrictedGroup\":\"\"}','${now}','${now}')"
|
||||||
|
|
||||||
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_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}"
|
|
||||||
else
|
|
||||||
echo "==> Failed to setup LDAP authentication"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_root_user() {
|
setup_root_user() {
|
||||||
@@ -47,11 +45,12 @@ setup_auth() {
|
|||||||
|
|
||||||
echo "==> Gitea is up, setting up auth"
|
echo "==> Gitea is up, setting up auth"
|
||||||
|
|
||||||
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||||
setup_ldap_source
|
setup_oidc_source
|
||||||
|
migrate_ldap_users_to_oidc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user;")
|
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user")
|
||||||
# be careful, not to create root user for existing LDAP based installs
|
# be careful, not to create root user for existing LDAP based installs
|
||||||
if [[ "${user_count}" == "0" ]]; then
|
if [[ "${user_count}" == "0" ]]; then
|
||||||
echo "==> Setting up root user for first run"
|
echo "==> Setting up root user for first run"
|
||||||
|
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
ssh -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${SCRIPT_DIR}/id_rsa "$@"
|
ssh -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${SCRIPT_DIR}/id_ed25519 "$@"
|
||||||
|
7
test/id_ed25519
Normal file
7
test/id_ed25519
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACDECyFdxcmgOemNvs0wUhkgzfj9IS2OTG6bU5AXfNkXfgAAAJAoNQg/KDUI
|
||||||
|
PwAAAAtzc2gtZWQyNTUxOQAAACDECyFdxcmgOemNvs0wUhkgzfj9IS2OTG6bU5AXfNkXfg
|
||||||
|
AAAEC9nIZlzus9hn/b99E/cnSE2Vpycx0invItrrzgOX9qwMQLIV3FyaA56Y2+zTBSGSDN
|
||||||
|
+P0hLY5MbptTkBd82Rd+AAAADW5lYnVsb25AbHVuYXI=
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
1
test/id_ed25519.pub
Normal file
1
test/id_ed25519.pub
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQLIV3FyaA56Y2+zTBSGSDN+P0hLY5MbptTkBd82Rd+ nebulon@lunar
|
27
test/id_rsa
27
test/id_rsa
@@ -1,27 +0,0 @@
|
|||||||
-----BEGIN RSA PRIVATE KEY-----
|
|
||||||
MIIEowIBAAKCAQEA14L+HdwPXRHC2A+fyRv1FTsRE/OPl0Z0KnEigzIIdA65CzTy
|
|
||||||
l3m3ATNFI1o/Ies7RW6rsr9UHuLLufNVg1NwIBdns8sPE4pSZSjfdPnznifIIs7y
|
|
||||||
wL/vn2D3JEhpA8EOasSy0c+z+6X23evsLB3D81y7ICsBc16Q147WZ6D+QMUP+A4b
|
|
||||||
wlmEcy0hAoPx/jnnPlRDVOK1ZnBvuAaHBkcBh+sA272BhB6Kv13MBu0wctDjKw5w
|
|
||||||
cNmgVWbzBBtK1L8BZVMDKmKWZ2PKP4GkkpnAvkD0+4sdARe148faV8HHigAKKNN7
|
|
||||||
vt+njs6nHuS4ksJL1E9cKGHdBJudJc3p24iI7QIDAQABAoIBABm5ojnQPek/KIIA
|
|
||||||
A3PPKYc6QMSf60EEgPNcA+GjRE0OQNpsnJSmS8kR5KvepvCWksGr/0Tb/9+b9POi
|
|
||||||
b0+40waRpKhakdckSMeYhGwDNihn2UUGbQXDI4hj27xyBE8VaXInPq063OIqInjF
|
|
||||||
I7D0cKKJLDEf0RGDdUi13TQLjK4QX78W/9S8d5ClznAVi4wUBb1urs7fAoVetn/i
|
|
||||||
PnlEj9KZHio4mCg28djTudAoWzjzUikRqKRYY5QNEJ13abVoLqIRSRHC1DzwpxVv
|
|
||||||
Y88l4hmm6IcmWGo0O9lpu5IJFvEmngfpmyaVbeLE0fhLPFWcEHARw37SThTZVQeY
|
|
||||||
Tx1816UCgYEA9j5dyNbFcC4YL9i9DQyut658bYziY2vsAvZNMMf249IJGbZOxlZK
|
|
||||||
ylB00zlbO/2uNh12Y9z6BN2hO2lER3O3SM75tCnvXR0+qG+xmfjLcRVczEkU10+r
|
|
||||||
8UxKBgg7Sf9uvfeONefEYPwiwzFoWgdaFSrR2sCmuoHPwfc9i+PSp+8CgYEA4Azq
|
|
||||||
DToKdv6VBWPlNXT6OW3+HUPeHF087Ve03+3orCckZ+d2DImEOvWdt+pDeGQJJcq+
|
|
||||||
o+SzZk9FjFOIiQehuA44OFrvcbag9YAlm1JQYYrRTdZEJz3iSucXCzJH/P5TrB84
|
|
||||||
BHvzgCklZzZ0IpEFxzMe8oNS6XfJmilh6I98YOMCgYBybOy7xUGeLW1D3p2LENen
|
|
||||||
t0dOyObyeFYF0lpwTpulphZgglz8wWCjvttqw/5nVCy+LNa09RyhYjPoHbSC13zW
|
|
||||||
MofKdqoqRMq3DqAjAn/XHqwuqc8rdnRZ/q9vOigC7NWTJRRKbFbPEps8xRrOqxfr
|
|
||||||
OiimVFul02ito6xP8yAStQKBgQDHbPdPup/h9wzx9U7p3Ct1vt/3cJddK+i1YeIP
|
|
||||||
iBYYVebjzXSYCDd4u3MdZxmTKYey6dnyy/ibUmgXVassPWzHBXEpSFflIaf3nY7b
|
|
||||||
x9LgX82ZuOSFAWJRRYyPXLwTBtW3WTplU2cUZotyaVfKBMfd3TToq9e7E/KQk9Eg
|
|
||||||
Tcdp/QKBgCyKD1gGU/H1bsQOuWHuFR1v7v82V1DLVjyn5kllej0tlfTLO/5uUsEE
|
|
||||||
SIjGHfTHxgpww9HN9BPyy8xdQMAc6p7UyvJAIyhg679AQBrMLLvhE5niaGu4jQOa
|
|
||||||
ZVY6nZUQNCwgxJwnUkFnOyXDYjzjyxZOCAWPxghYbS+IEl1GzhZU
|
|
||||||
-----END RSA PRIVATE KEY-----
|
|
@@ -1 +0,0 @@
|
|||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXgv4d3A9dEcLYD5/JG/UVOxET84+XRnQqcSKDMgh0DrkLNPKXebcBM0UjWj8h6ztFbquyv1Qe4su581WDU3AgF2ezyw8TilJlKN90+fOeJ8gizvLAv++fYPckSGkDwQ5qxLLRz7P7pfbd6+wsHcPzXLsgKwFzXpDXjtZnoP5AxQ/4DhvCWYRzLSECg/H+Oec+VENU4rVmcG+4BocGRwGH6wDbvYGEHoq/XcwG7TBy0OMrDnBw2aBVZvMEG0rUvwFlUwMqYpZnY8o/gaSSmcC+QPT7ix0BF7Xjx9pXwceKAAoo03u+36eOzqce5LiSwkvUT1woYd0Em50lzenbiIjt girish@beast
|
|
124
test/package-lock.json
generated
124
test/package-lock.json
generated
@@ -9,17 +9,17 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^115.0.0",
|
"chromedriver": "^120.0.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"selenium-webdriver": "^4.10.0",
|
"selenium-webdriver": "^4.16.0",
|
||||||
"superagent": "^8.0.9"
|
"superagent": "^8.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@testim/chrome-version": {
|
"node_modules/@testim/chrome-version": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz",
|
||||||
"integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A=="
|
"integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "16.11.11",
|
"version": "16.11.11",
|
||||||
@@ -105,9 +105,9 @@
|
|||||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.4.0",
|
"version": "1.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
|
||||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
"integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
@@ -236,24 +236,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chromedriver": {
|
"node_modules/chromedriver": {
|
||||||
"version": "115.0.0",
|
"version": "120.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.0.tgz",
|
||||||
"integrity": "sha512-mkPL+sXMLMUenoXCiKREw+cBl3ibfhiWxkiv9ByIPpqtrrInCt9zKdOolAsbmN/ndlH51WtT5ukUKbeRdrpikg==",
|
"integrity": "sha512-LGy2LhWRBiqDarFIU8gQ43EEyj+07Tc3JuUhthkESAwZ99lrifSnKZwKU0aVwansU84+k6bt71z7K3dkk65gZg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testim/chrome-version": "^1.1.3",
|
"@testim/chrome-version": "^1.1.4",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.6.0",
|
||||||
"compare-versions": "^6.0.0",
|
"compare-versions": "^6.1.0",
|
||||||
"extract-zip": "^2.0.1",
|
"extract-zip": "^2.0.1",
|
||||||
"https-proxy-agent": "^5.0.1",
|
"https-proxy-agent": "^5.0.1",
|
||||||
"proxy-from-env": "^1.1.0",
|
"proxy-from-env": "^1.1.0",
|
||||||
"tcp-port-used": "^1.0.1"
|
"tcp-port-used": "^1.0.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"chromedriver": "bin/chromedriver"
|
"chromedriver": "bin/chromedriver"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cliui": {
|
"node_modules/cliui": {
|
||||||
@@ -294,9 +294,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/compare-versions": {
|
"node_modules/compare-versions": {
|
||||||
"version": "6.0.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz",
|
||||||
"integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ=="
|
"integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg=="
|
||||||
},
|
},
|
||||||
"node_modules/component-emitter": {
|
"node_modules/component-emitter": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
@@ -479,9 +479,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
"node_modules/follow-redirects": {
|
||||||
"version": "1.15.2",
|
"version": "1.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
@@ -1171,13 +1171,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/selenium-webdriver": {
|
"node_modules/selenium-webdriver": {
|
||||||
"version": "4.10.0",
|
"version": "4.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.16.0.tgz",
|
||||||
"integrity": "sha512-hSQPw6jgc+ej/UEcdQPG/iBwwMeCEgZr9HByY/J8ToyXztEqXzU9aLsIyrlj1BywBcStO4JQK/zMUWWrV8+riA==",
|
"integrity": "sha512-IbqpRpfGE7JDGgXHJeWuCqT/tUqnLvZ14csSwt+S8o4nJo3RtQoE9VR4jB47tP/A8ArkYsh/THuMY6kyRP6kuA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"ws": ">=8.13.0"
|
"ws": ">=8.14.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.20.0"
|
"node": ">= 14.20.0"
|
||||||
@@ -1272,9 +1272,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/superagent": {
|
"node_modules/superagent": {
|
||||||
"version": "8.0.9",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz",
|
||||||
"integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==",
|
"integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"component-emitter": "^1.3.0",
|
"component-emitter": "^1.3.0",
|
||||||
"cookiejar": "^2.1.4",
|
"cookiejar": "^2.1.4",
|
||||||
@@ -1398,9 +1398,9 @@
|
|||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"node_modules/ws": {
|
"node_modules/ws": {
|
||||||
"version": "8.13.0",
|
"version": "8.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
||||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
@@ -1492,9 +1492,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testim/chrome-version": {
|
"@testim/chrome-version": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz",
|
||||||
"integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A=="
|
"integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "16.11.11",
|
"version": "16.11.11",
|
||||||
@@ -1562,9 +1562,9 @@
|
|||||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "1.4.0",
|
"version": "1.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
|
||||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
"integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
@@ -1657,17 +1657,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"chromedriver": {
|
"chromedriver": {
|
||||||
"version": "115.0.0",
|
"version": "120.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.0.tgz",
|
||||||
"integrity": "sha512-mkPL+sXMLMUenoXCiKREw+cBl3ibfhiWxkiv9ByIPpqtrrInCt9zKdOolAsbmN/ndlH51WtT5ukUKbeRdrpikg==",
|
"integrity": "sha512-LGy2LhWRBiqDarFIU8gQ43EEyj+07Tc3JuUhthkESAwZ99lrifSnKZwKU0aVwansU84+k6bt71z7K3dkk65gZg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@testim/chrome-version": "^1.1.3",
|
"@testim/chrome-version": "^1.1.4",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.6.0",
|
||||||
"compare-versions": "^6.0.0",
|
"compare-versions": "^6.1.0",
|
||||||
"extract-zip": "^2.0.1",
|
"extract-zip": "^2.0.1",
|
||||||
"https-proxy-agent": "^5.0.1",
|
"https-proxy-agent": "^5.0.1",
|
||||||
"proxy-from-env": "^1.1.0",
|
"proxy-from-env": "^1.1.0",
|
||||||
"tcp-port-used": "^1.0.1"
|
"tcp-port-used": "^1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cliui": {
|
"cliui": {
|
||||||
@@ -1702,9 +1702,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compare-versions": {
|
"compare-versions": {
|
||||||
"version": "6.0.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz",
|
||||||
"integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ=="
|
"integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg=="
|
||||||
},
|
},
|
||||||
"component-emitter": {
|
"component-emitter": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
@@ -1838,9 +1838,9 @@
|
|||||||
"integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="
|
"integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.15.2",
|
"version": "1.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
|
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q=="
|
||||||
},
|
},
|
||||||
"form-data": {
|
"form-data": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -2323,13 +2323,13 @@
|
|||||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||||
},
|
},
|
||||||
"selenium-webdriver": {
|
"selenium-webdriver": {
|
||||||
"version": "4.10.0",
|
"version": "4.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.16.0.tgz",
|
||||||
"integrity": "sha512-hSQPw6jgc+ej/UEcdQPG/iBwwMeCEgZr9HByY/J8ToyXztEqXzU9aLsIyrlj1BywBcStO4JQK/zMUWWrV8+riA==",
|
"integrity": "sha512-IbqpRpfGE7JDGgXHJeWuCqT/tUqnLvZ14csSwt+S8o4nJo3RtQoE9VR4jB47tP/A8ArkYsh/THuMY6kyRP6kuA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"ws": ">=8.13.0"
|
"ws": ">=8.14.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
@@ -2402,9 +2402,9 @@
|
|||||||
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
|
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
|
||||||
},
|
},
|
||||||
"superagent": {
|
"superagent": {
|
||||||
"version": "8.0.9",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz",
|
||||||
"integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==",
|
"integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"component-emitter": "^1.3.0",
|
"component-emitter": "^1.3.0",
|
||||||
"cookiejar": "^2.1.4",
|
"cookiejar": "^2.1.4",
|
||||||
@@ -2497,9 +2497,9 @@
|
|||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "8.13.0",
|
"version": "8.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
||||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"y18n": {
|
"y18n": {
|
||||||
|
@@ -9,10 +9,10 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^115.0.0",
|
"chromedriver": "^120.0.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"selenium-webdriver": "^4.10.0",
|
"selenium-webdriver": "^4.16.0",
|
||||||
"superagent": "^8.0.9"
|
"superagent": "^8.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
61
test/test.js
61
test/test.js
@@ -33,6 +33,7 @@ describe('Application life cycle test', function () {
|
|||||||
const SSH_PORT = 29420;
|
const SSH_PORT = 29420;
|
||||||
|
|
||||||
let app, browser;
|
let app, browser;
|
||||||
|
var athenticated_by_oidc = false;
|
||||||
|
|
||||||
const repodir = '/tmp/testrepo';
|
const repodir = '/tmp/testrepo';
|
||||||
const reponame = 'testrepo';
|
const reponame = 'testrepo';
|
||||||
@@ -56,6 +57,11 @@ describe('Application life cycle test', function () {
|
|||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function waitForElement(elem) {
|
||||||
|
await browser.wait(until.elementLocated(elem), TIMEOUT);
|
||||||
|
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
function sleep(millis) {
|
function sleep(millis) {
|
||||||
return new Promise(resolve => setTimeout(resolve, millis));
|
return new Promise(resolve => setTimeout(resolve, millis));
|
||||||
}
|
}
|
||||||
@@ -93,6 +99,29 @@ describe('Application life cycle test', function () {
|
|||||||
await login('root', 'changeme');
|
await login('root', 'changeme');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function loginOIDC(username, password) {
|
||||||
|
browser.manage().deleteAllCookies();
|
||||||
|
await browser.get(`https://${app.fqdn}/user/login`);
|
||||||
|
await browser.sleep(2000);
|
||||||
|
|
||||||
|
|
||||||
|
await browser.findElement(By.xpath('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]')).click();
|
||||||
|
await browser.sleep(2000);
|
||||||
|
|
||||||
|
if (!athenticated_by_oidc) {
|
||||||
|
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||||
|
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
||||||
|
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
||||||
|
await browser.sleep(2000);
|
||||||
|
await browser.findElement(By.xpath('//button[@type="submit" and contains(text(), "Sign in")]')).click();
|
||||||
|
await browser.sleep(2000);
|
||||||
|
|
||||||
|
athenticated_by_oidc = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//img[contains(@class, "avatar")]'));
|
||||||
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await browser.get('https://' + app.fqdn);
|
await browser.get('https://' + app.fqdn);
|
||||||
|
|
||||||
@@ -103,11 +132,25 @@ describe('Application life cycle test', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function addPublicKey() {
|
async function addPublicKey() {
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
||||||
|
|
||||||
const sshPage = 'https://' + app.fqdn + '/user/settings/keys';
|
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
||||||
|
|
||||||
await browser.get(sshPage);
|
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
||||||
|
await browser.findElement(By.id('add-ssh-button')).click();
|
||||||
|
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
||||||
|
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
||||||
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
||||||
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
|
await browser.findElement(By.xpath('//form//button[contains(text(),"Add Key")]')).click();
|
||||||
|
|
||||||
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addPublicKeyOld() {
|
||||||
|
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
||||||
|
|
||||||
|
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
||||||
|
|
||||||
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
||||||
await browser.findElement(By.id('add-ssh-button')).click();
|
await browser.findElement(By.id('add-ssh-button')).click();
|
||||||
@@ -182,7 +225,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
|
|
||||||
@@ -198,7 +241,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
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', loginOIDC.bind(null, username, password)); // no need to relogin since session persists
|
||||||
it('displays correct clone url', checkCloneUrl);
|
it('displays correct clone url', checkCloneUrl);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', fileExists);
|
it('file exists in repo', fileExists);
|
||||||
@@ -206,7 +249,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||||
it('restore app', function () { execSync('cloudron restore --app ' + app.id, EXEC_ARGS); });
|
it('restore app', function () { execSync('cloudron restore --app ' + app.id, EXEC_ARGS); });
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', loginOIDC.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 repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
@@ -220,7 +263,7 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('displays correct clone url', checkCloneUrl);
|
it('displays correct clone url', checkCloneUrl);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
@@ -248,7 +291,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('can install app', function () { execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
it('can install app', function () { 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', loginOIDC.bind(null, username, password));
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can add public key', addPublicKey);
|
it('can add public key', addPublicKey);
|
||||||
@@ -263,7 +306,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', login.bind(null, username, password));
|
it('can login', loginOIDC.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);
|
||||||
|
Reference in New Issue
Block a user