mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2026-05-01 06:53:37 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| caa5274a5d | |||
| ae8096ed29 | |||
| 3d5b4ed571 | |||
| f7166969a0 | |||
| 317c03bba2 | |||
| adb5a3e683 | |||
| e73d6d68a5 | |||
| 6359bc1e2c | |||
| 99ecdfefff | |||
| cdb45943d3 |
@@ -1,2 +1,4 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
|
test/test-results.xml
|
||||||
|
test/screenshots/
|
||||||
|
|||||||
@@ -1994,3 +1994,17 @@
|
|||||||
* Automatic generation of release notes ([#35977](https://github.com/go-gitea/gitea/issues/35977))
|
* Automatic generation of release notes ([#35977](https://github.com/go-gitea/gitea/issues/35977))
|
||||||
* Add button to re-run failed jobs in Actions ([#36924](https://github.com/go-gitea/gitea/issues/36924))
|
* Add button to re-run failed jobs in Actions ([#36924](https://github.com/go-gitea/gitea/issues/36924))
|
||||||
|
|
||||||
|
[1.38.1]
|
||||||
|
* Update gitea to 1.26.1
|
||||||
|
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.26.1)
|
||||||
|
* Add event.schedule context for schedule actions task ([#37320](https://github.com/go-gitea/gitea/issues/37320)) ([#37348](https://github.com/go-gitea/gitea/issues/37348))
|
||||||
|
* Fix an issue where changing an organization's visibility caused problems when users had forked its repositories. ([#37324](https://github.com/go-gitea/gitea/issues/37324)) ([#37344](https://github.com/go-gitea/gitea/issues/37344))
|
||||||
|
* Use modern "git update-index --cacheinfo" syntax to support more file names ([#37338](https://github.com/go-gitea/gitea/issues/37338)) ([#37343](https://github.com/go-gitea/gitea/issues/37343))
|
||||||
|
* Fix URL related escaping for oauth2 ([#37334](https://github.com/go-gitea/gitea/issues/37334)) ([#37340](https://github.com/go-gitea/gitea/issues/37340))
|
||||||
|
* When the requested arch rpm is missing fall back to noarch ([#37236](https://github.com/go-gitea/gitea/issues/37236)) ([#37339](https://github.com/go-gitea/gitea/issues/37339))
|
||||||
|
* Fix actions concurrency groups cross-branch leak ([#37311](https://github.com/go-gitea/gitea/issues/37311)) ([#37331](https://github.com/go-gitea/gitea/issues/37331))
|
||||||
|
* Fix bug when accessing user badges ([#37321](https://github.com/go-gitea/gitea/issues/37321)) ([#37329](https://github.com/go-gitea/gitea/issues/37329))
|
||||||
|
* Fix container auth for public instance ([#37290](https://github.com/go-gitea/gitea/issues/37290)) ([#37294](https://github.com/go-gitea/gitea/issues/37294))
|
||||||
|
* Fix Mermaid diagrams failing when node labels contain line breaks ([#37296](https://github.com/go-gitea/gitea/issues/37296)) ([#37299](https://github.com/go-gitea/gitea/issues/37299))
|
||||||
|
* Fix: dump with default zip type produces uncompressed zip ([#37401](https://github.com/go-gitea/gitea/issues/37401)) [#37402](https://github.com/go-gitea/gitea/issues/37402)
|
||||||
|
|
||||||
|
|||||||
@@ -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.38.0",
|
"version": "1.38.1",
|
||||||
"upstreamVersion": "1.26.0",
|
"upstreamVersion": "1.26.1",
|
||||||
"healthCheckPath": "/explore",
|
"healthCheckPath": "/explore",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ WORKDIR /home/git
|
|||||||
ENV GNUPGHOME="/app/data/gnupg"
|
ENV GNUPGHOME="/app/data/gnupg"
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
|
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
ARG GITEA_VERSION=1.26.0
|
ARG GITEA_VERSION=1.26.1
|
||||||
|
|
||||||
RUN mkdir -p /home/git/gitea && \
|
RUN mkdir -p /home/git/gitea && \
|
||||||
curl -L https://github.com/go-gitea/gitea/releases/download/v${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
curl -L https://github.com/go-gitea/gitea/releases/download/v${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
|
|||||||
Executable → Regular
+35
-90
@@ -4,23 +4,21 @@ import assert from 'node:assert/strict';
|
|||||||
import { execSync } from 'node:child_process';
|
import { execSync } from 'node:child_process';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import superagent from '@cloudron/superagent';
|
|
||||||
import {
|
import {
|
||||||
app,
|
app,
|
||||||
clearCache,
|
clearCache,
|
||||||
click,
|
click,
|
||||||
cloudronCli,
|
cloudronCli,
|
||||||
executeScript,
|
|
||||||
goto,
|
goto,
|
||||||
loginOIDC,
|
loginOIDC,
|
||||||
sendKeys,
|
sendKeys,
|
||||||
setInputFiles,
|
|
||||||
setupBrowser,
|
setupBrowser,
|
||||||
takeScreenshot,
|
takeScreenshot,
|
||||||
teardownBrowser,
|
teardownBrowser,
|
||||||
username,
|
username,
|
||||||
waitForElement,
|
waitFor,
|
||||||
waitForPath
|
waitForUrl,
|
||||||
|
press
|
||||||
} from '@cloudron/charlie';
|
} from '@cloudron/charlie';
|
||||||
|
|
||||||
/* global it, describe, before, after, afterEach */
|
/* global it, describe, before, after, afterEach */
|
||||||
@@ -41,32 +39,12 @@ describe('Application life cycle test', function () {
|
|||||||
await takeScreenshot(this.currentTest.title);
|
await takeScreenshot(this.currentTest.title);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function setAvatar() {
|
|
||||||
await goto(`https://${app.fqdn}/user/settings`, '//label[contains(text(), "Use Custom Avatar")]');
|
|
||||||
await click('//label[contains(text(), "Use Custom Avatar")]');
|
|
||||||
await setInputFiles('//input[@type="file" and @name="avatar"]', path.resolve(import.meta.dirname, '../logo.png'));
|
|
||||||
await click('//button[contains(text(), "Update Avatar")]');
|
|
||||||
await waitForElement('//p[contains(text(),"Your avatar has been updated.")]');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function checkAvatar() {
|
|
||||||
await goto(`https://${app.fqdn}/${username}`, '//div[@id="profile-avatar"]/a/img');
|
|
||||||
const avatarSrc = await executeScript(() => {
|
|
||||||
const el = document.querySelector('#profile-avatar a img');
|
|
||||||
return el ? el.getAttribute('src') : null;
|
|
||||||
});
|
|
||||||
assert.ok(avatarSrc);
|
|
||||||
const avatarUrl = new URL(avatarSrc, `https://${app.fqdn}`).href;
|
|
||||||
const response = await superagent.get(avatarUrl);
|
|
||||||
assert.strictEqual(response.status, 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function login(user, passwd) {
|
async function login(user, passwd) {
|
||||||
await goto(`https://${app.fqdn}/user/login`, '#user_name');
|
await goto(`https://${app.fqdn}/user/login`, 'label=Username or Email Address');
|
||||||
await sendKeys('#user_name', user);
|
await sendKeys('label=Username or Email Address', user);
|
||||||
await sendKeys('#password', passwd);
|
await sendKeys('label=Password', passwd);
|
||||||
await click('//form[@action="/user/login"]//button');
|
await click('Sign In', { role: 'button' }); // there is a sign in link at the top
|
||||||
await waitForElement('//nav//img[contains(@class, "avatar")]');
|
await waitFor('Milestones');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function adminLogin() {
|
async function adminLogin() {
|
||||||
@@ -75,43 +53,33 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
async function loginGiteaOIDC() {
|
async function loginGiteaOIDC() {
|
||||||
await clearCache();
|
await clearCache();
|
||||||
await goto(`https://${app.fqdn}/user/login`, '//a[@href="/user/oauth2/cloudron"]');
|
await goto(`https://${app.fqdn}/user/login`, /Sign in with/);
|
||||||
await click('//a[@href="/user/oauth2/cloudron"]');
|
await click(/Sign in with/);
|
||||||
await loginOIDC('//nav//img[contains(@class, "avatar")]');
|
await loginOIDC('Milestones');
|
||||||
}
|
|
||||||
|
|
||||||
async function loginGiteaOIDCOld() {
|
|
||||||
await clearCache();
|
|
||||||
await goto(`https://${app.fqdn}/user/login`, '//a[contains(@class, "openidConnect")]');
|
|
||||||
await click('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]');
|
|
||||||
await loginOIDC('//nav//img[contains(@class, "avatar")]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await goto(`https://${app.fqdn}`, '//nav//img[contains(@class, "avatar")]');
|
await clearCache();
|
||||||
await click('//nav//img[contains(@class, "avatar")]');
|
|
||||||
await waitForElement('//a[@href="/user/logout"]');
|
|
||||||
await click('//a[@href="/user/logout"]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addPublicKey() {
|
async function addPublicKey() {
|
||||||
const keyPath = path.join(import.meta.dirname, 'id_ed25519');
|
const keyPath = path.join(import.meta.dirname, 'id_ed25519');
|
||||||
fs.chmodSync(keyPath, 0o600);
|
fs.chmodSync(keyPath, 0o600);
|
||||||
|
|
||||||
await goto(`https://${app.fqdn}/user/settings/keys`, '#add-ssh-button');
|
await goto(`https://${app.fqdn}/user/settings/keys`, 'css=#add-ssh-button');
|
||||||
await click('#add-ssh-button');
|
await click('css=#add-ssh-button'); // there are two Add key buttons
|
||||||
await sendKeys('#ssh-key-title', 'testkey');
|
await sendKeys('label=Content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim()); // there are two Content labels
|
||||||
await sendKeys('#ssh-key-content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim());
|
await sendKeys('label=Key Name', 'testkey');
|
||||||
await click('//form//button[contains(text(),"Add Key")]');
|
await press('label=Key Name', 'Enter');
|
||||||
await waitForElement('//p[contains(text(), "has been added.")]');
|
await waitFor(/has been added/);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createRepo() {
|
async function createRepo() {
|
||||||
await goto(`https://${app.fqdn}/repo/create`, '#repo_name');
|
await goto(`https://${app.fqdn}/repo/create`, 'label=Repository Name');
|
||||||
await sendKeys('#repo_name', reponame);
|
await sendKeys('label=Repository Name', reponame);
|
||||||
await click('#auto-init');
|
await click(/Initialize Repository/);
|
||||||
await click('//button[contains(text(), "Create Repository")]');
|
await click('Create Repository');
|
||||||
await waitForPath(`/${username}/${reponame}`);
|
await waitForUrl(`https://${app.fqdn}/${username}/${reponame}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneRepo() {
|
function cloneRepo() {
|
||||||
@@ -143,8 +111,6 @@ describe('Application life cycle test', function () {
|
|||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', loginGiteaOIDC);
|
it('can login', loginGiteaOIDC);
|
||||||
it('can set avatar', setAvatar);
|
|
||||||
it('can get avatar', checkAvatar);
|
|
||||||
|
|
||||||
it('can add public key', addPublicKey);
|
it('can add public key', addPublicKey);
|
||||||
|
|
||||||
@@ -154,41 +120,29 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can restart app', function () {
|
it('can restart app', cloudronCli.restart);
|
||||||
cloudronCli.restart();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', fileExists);
|
it('file exists in repo', fileExists);
|
||||||
|
|
||||||
it('backup app', async function () {
|
it('backup app', cloudronCli.createBackup);
|
||||||
await cloudronCli.createBackup();
|
it('restore app', cloudronCli.restoreFromLatestBackup);
|
||||||
});
|
|
||||||
it('restore app', async function () {
|
|
||||||
await cloudronCli.restoreFromLatestBackup();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', loginGiteaOIDC);
|
it('can login', loginGiteaOIDC);
|
||||||
it('can get avatar', checkAvatar);
|
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () {
|
it('file exists in repo', function () {
|
||||||
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('move to different location', async function () {
|
it('move to different location', cloudronCli.changeLocation);
|
||||||
await cloudronCli.changeLocation();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', loginGiteaOIDC);
|
it('can login', loginGiteaOIDC);
|
||||||
it('can get avatar', checkAvatar);
|
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () {
|
it('file exists in repo', function () {
|
||||||
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('uninstall app', async function () {
|
it('uninstall app', cloudronCli.uninstall);
|
||||||
await cloudronCli.uninstall();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('install app (no sso)', function () {
|
it('install app (no sso)', function () {
|
||||||
cloudronCli.install({ noSso: true, tcpPortFlags: INSTALL_TCP_FLAGS });
|
cloudronCli.install({ noSso: true, tcpPortFlags: INSTALL_TCP_FLAGS });
|
||||||
@@ -197,35 +151,26 @@ describe('Application life cycle test', function () {
|
|||||||
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)', async function () {
|
it('uninstall app (no sso)', cloudronCli.uninstall);
|
||||||
await cloudronCli.uninstall();
|
|
||||||
|
it('can install app from appstore', async function () {
|
||||||
|
await cloudronCli.appstoreInstall({ tcpPortFlags: INSTALL_TCP_FLAGS });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can install app', function () {
|
it('can login', loginGiteaOIDC);
|
||||||
cloudronCli.appstoreInstall({ tcpPortFlags: INSTALL_TCP_FLAGS });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', loginGiteaOIDCOld);
|
|
||||||
it('can set avatar', setAvatar);
|
|
||||||
it('can get avatar', checkAvatar);
|
|
||||||
it('can add public key', addPublicKey);
|
it('can add public key', addPublicKey);
|
||||||
it('can create repo', createRepo);
|
it('can create repo', createRepo);
|
||||||
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', async function () {
|
it('can update', cloudronCli.update);
|
||||||
await cloudronCli.update();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can admin login', adminLogin);
|
it('can admin login', adminLogin);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', loginGiteaOIDC);
|
it('can login', loginGiteaOIDC);
|
||||||
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', async function () {
|
it('uninstall app', cloudronCli.uninstall);
|
||||||
await cloudronCli.uninstall();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user