Add tests for proxy app upstreamUri
This commit is contained in:
@@ -43,6 +43,34 @@ const manifest = {
|
||||
}
|
||||
};
|
||||
|
||||
// copied from the proxy app CloudronManifest.json
|
||||
const proxyAppManifest = {
|
||||
"id": "io.cloudron.builtin.appproxy",
|
||||
"title": "App Proxy",
|
||||
"author": "Cloudron Team",
|
||||
"version": "1.0.0",
|
||||
"upstreamVersion": "1.0.0",
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"tagline": "Proxy an app through Cloudron",
|
||||
"tags": [ "proxy", "external" ],
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 3000,
|
||||
"minBoxVersion": "7.3.0",
|
||||
"dockerImage": "istobeignored",
|
||||
"manifestVersion": 2,
|
||||
"multiDomain": true,
|
||||
"website": "https://cloudron.io",
|
||||
"documentationUrl": "https://docs.cloudron.io/dashboard/#app-proxy",
|
||||
"forumUrl": "https://forum.cloudron.io",
|
||||
"contactEmail": "support@cloudron.io",
|
||||
"icon": "file://logo.png",
|
||||
"addons": {},
|
||||
"mediaLinks": [
|
||||
"https://screenshots.cloudron.io/io.cloudron.builtin.appproxy/diagram.png"
|
||||
],
|
||||
"changelog": "file://CHANGELOG.md"
|
||||
};
|
||||
|
||||
const domain = {
|
||||
domain: 'example.com',
|
||||
zoneName: 'example.com',
|
||||
@@ -110,6 +138,27 @@ const app = {
|
||||
};
|
||||
Object.freeze(app);
|
||||
|
||||
const proxyApp = {
|
||||
id: 'proxyapptestid',
|
||||
appStoreId: proxyAppManifest.id,
|
||||
installationState: apps.ISTATE_PENDING_INSTALL,
|
||||
runState: 'running',
|
||||
subdomain: 'proxylocation',
|
||||
upstreamUri: 'http://1.2.3.4:80',
|
||||
domain: domain.domain,
|
||||
fqdn: domain.domain + '.' + 'proxylocation',
|
||||
manifest,
|
||||
containerId: '',
|
||||
portBindings: null,
|
||||
accessRestriction: null,
|
||||
memoryLimit: 0,
|
||||
mailboxDomain: domain.domain,
|
||||
secondaryDomains: [],
|
||||
redirectDomains: [],
|
||||
aliasDomains: []
|
||||
};
|
||||
Object.freeze(proxyApp);
|
||||
|
||||
exports = module.exports = {
|
||||
createTree,
|
||||
domainSetup,
|
||||
@@ -124,6 +173,7 @@ exports = module.exports = {
|
||||
dashboardFqdn: `my.${domain.domain}`,
|
||||
|
||||
app,
|
||||
proxyApp,
|
||||
admin,
|
||||
auditSource,
|
||||
domain, // the domain object
|
||||
|
||||
Reference in New Issue
Block a user