Merge branch 'master' of ssh://git.cloudron.io:6000/cloudron/minio-app
This commit is contained in:
commit
6bfe0bb79d
14
CHANGELOG
14
CHANGELOG
|
@ -28,3 +28,17 @@
|
||||||
|
|
||||||
[0.2.7]
|
[0.2.7]
|
||||||
* Updated to 2017-06-13T19-01-01Z
|
* Updated to 2017-06-13T19-01-01Z
|
||||||
|
|
||||||
|
[0.3.0]
|
||||||
|
* Update to 2017-07-24T18-27-35Z
|
||||||
|
|
||||||
|
[1.0.0]
|
||||||
|
* Update to 2017-08-05T00-00-53Z
|
||||||
|
|
||||||
|
[1.1.0]
|
||||||
|
* Update to 2017-09-29T19-16-56Z
|
||||||
|
* This version requires at Cloudron v1.7.2
|
||||||
|
|
||||||
|
[1.2.0]
|
||||||
|
* Update to 2017-10-27T18-59-02Z
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Distributed object storage",
|
"tagline": "Distributed object storage",
|
||||||
"version": "0.2.7",
|
"version": "1.2.0",
|
||||||
"healthCheckPath": "/minio/login",
|
"healthCheckPath": "/minio/login",
|
||||||
"httpPort": 8000,
|
"httpPort": 8000,
|
||||||
"addons": {
|
"addons": {
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
},
|
},
|
||||||
"manifestVersion": 1,
|
"manifestVersion": 1,
|
||||||
"website": "http://www.minio.io",
|
"website": "http://www.minio.io",
|
||||||
|
"minBoxVersion": "1.7.2",
|
||||||
"contactEmail": "support@cloudron.io",
|
"contactEmail": "support@cloudron.io",
|
||||||
"icon": "logo.png",
|
"icon": "logo.png",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
This app packages Minio <upstream>2017-06-13T19-01-01Z</upstream>.
|
This app packages Minio <upstream>2017-10-27T18-59-02Z</upstream>.
|
||||||
|
|
||||||
Minio is a distributed object storage server built for cloud applications and devops.
|
Minio is a distributed object storage server built for cloud applications and devops.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ MAINTAINER Minio Developers <support@cloudron.io>
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
ENV VERSION 2017-06-13T19-01-01Z
|
ENV VERSION 2017-10-27T18-59-02Z
|
||||||
|
|
||||||
RUN mkdir -p /app/code \
|
RUN mkdir -p /app/code \
|
||||||
&& wget https://dl.minio.io/server/minio/release/linux-amd64/minio.RELEASE.${VERSION} -O /app/code/minio \
|
&& wget https://dl.minio.io/server/minio/release/linux-amd64/minio.RELEASE.${VERSION} -O /app/code/minio \
|
||||||
|
|
154
test/test.js
154
test/test.js
|
@ -13,9 +13,7 @@ var by = webdriver.By,
|
||||||
var accessKey = 'admin',
|
var accessKey = 'admin',
|
||||||
secretKey = 'secretkey';
|
secretKey = 'secretkey';
|
||||||
|
|
||||||
var bucket_prefix = 'bucket',
|
var bucket = 'cloudrontestbucket';
|
||||||
bucket_id = 0,
|
|
||||||
bucket;
|
|
||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||||
|
|
||||||
|
@ -45,81 +43,100 @@ describe('Application life cycle test', function () {
|
||||||
var TEST_TIMEOUT = 10000;
|
var TEST_TIMEOUT = 10000;
|
||||||
var app;
|
var app;
|
||||||
|
|
||||||
function pageLoaded(callback) {
|
function pageLoaded() {
|
||||||
return browser.wait(until.elementLocated(by.className('page-load pl-0 pl-1')), TEST_TIMEOUT).then(function () {
|
return browser.wait(until.elementLocated(by.className('page-load pl-0 pl-1')), TEST_TIMEOUT);
|
||||||
callback();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function visible(selector, callback) {
|
function visible(selector) {
|
||||||
return browser.wait(until.elementLocated(selector), TEST_TIMEOUT).then(function () {
|
return browser.wait(until.elementLocated(selector), TEST_TIMEOUT).then(function () {
|
||||||
browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT).then(function () {
|
return browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT);
|
||||||
callback();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function login(callback) {
|
function login(callback) {
|
||||||
browser.manage().deleteAllCookies();
|
browser.manage().deleteAllCookies();
|
||||||
browser.get('https://' + app.fqdn);
|
browser.get('https://' + app.fqdn).then(function () {
|
||||||
|
return visible(by.id('accessKey'));
|
||||||
visible(by.id('accessKey'), function () {
|
}).then(function () {
|
||||||
browser.findElement(by.id('accessKey')).sendKeys(accessKey);
|
return browser.findElement(by.id('accessKey')).sendKeys(accessKey);
|
||||||
browser.findElement(by.id('secretKey')).sendKeys(secretKey);
|
}).then(function () {
|
||||||
browser.findElement(by.className('lw-btn')).click();
|
return browser.findElement(by.id('secretKey')).sendKeys(secretKey);
|
||||||
browser.wait(until.elementLocated(by.id('top-right-menu')), TEST_TIMEOUT).then(function () { callback(); });
|
}).then(function () {
|
||||||
|
return browser.findElement(by.className('lw-btn')).click();
|
||||||
|
}).then(function () {
|
||||||
|
return browser.wait(until.elementLocated(by.id('top-right-menu')), TEST_TIMEOUT);
|
||||||
|
}).then(function () {
|
||||||
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout(callback) {
|
function logout(callback) {
|
||||||
browser.get('https://' + app.fqdn);
|
browser.get('https://' + app.fqdn);
|
||||||
|
|
||||||
pageLoaded(function () {
|
pageLoaded().then(function () {
|
||||||
visible(by.id('top-right-menu'), function () {
|
return visible(by.id('top-right-menu'));
|
||||||
browser.findElement(by.id('top-right-menu')).click();
|
}).then(function () {
|
||||||
visible(by.xpath('//*[text()="Sign Out "]'), function () {
|
return browser.findElement(by.id('top-right-menu')).click();
|
||||||
browser.findElement(by.xpath('//*[text()="Sign Out "]')).click();
|
}).then(function () {
|
||||||
|
return visible(by.xpath('//*[text()="Sign Out "]'));
|
||||||
browser.wait(until.elementLocated(by.id('accessKey')), TEST_TIMEOUT).then(function () { callback(); });
|
}).then(function () {
|
||||||
});
|
return browser.findElement(by.xpath('//*[text()="Sign Out "]')).click();
|
||||||
});
|
}).then(function () {
|
||||||
|
return browser.wait(until.elementLocated(by.id('accessKey')), TEST_TIMEOUT);
|
||||||
|
}).then(function () {
|
||||||
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addBucket(callback) {
|
function addBucket(callback) {
|
||||||
bucket_id = bucket_id + 1;
|
|
||||||
bucket = bucket_prefix + bucket_id;
|
|
||||||
browser.get('https://' + app.fqdn);
|
browser.get('https://' + app.fqdn);
|
||||||
|
|
||||||
pageLoaded(function () {
|
pageLoaded().then(function () {
|
||||||
visible(by.className('fa fa-plus'), function () {
|
return visible(by.className('fa fa-plus'));
|
||||||
browser.findElement(by.className('fa fa-plus')).click();
|
}).then(function () {
|
||||||
visible(by.className('fa fa-hdd-o'), function () {
|
return browser.findElement(by.className('fa fa-plus')).click();
|
||||||
browser.findElement(by.className('fa fa-hdd-o')).click();
|
}).then(function () {
|
||||||
visible(by.xpath('//*[@class="modal-body"]/form/div/input'), function() {
|
return visible(by.className('fa fa-hdd-o'));
|
||||||
browser.findElement(by.xpath('//*[@class="modal-body"]/form/div/input')).sendKeys(bucket);
|
}).then(function () {
|
||||||
browser.findElement(by.xpath('//*[@class="modal-body"]/form')).submit();
|
return browser.findElement(by.className('fa fa-hdd-o')).click();
|
||||||
visible(by.xpath('//*[@class="main"]/a[text()="' + bucket + '"]'), function() {
|
}).then(function () {
|
||||||
|
return visible(by.xpath('//*[@class="modal-body"]/form/div/input'));
|
||||||
|
}).then(function () {
|
||||||
|
return browser.findElement(by.xpath('//*[@class="modal-body"]/form/div/input')).sendKeys(bucket);
|
||||||
|
}).then(function () {
|
||||||
|
return browser.findElement(by.xpath('//*[@class="modal-body"]/form')).submit();
|
||||||
|
}).then(function () {
|
||||||
|
return visible(by.xpath('//*[@class="main"]/a[text()="' + bucket + '"]'));
|
||||||
|
}).then(function () {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
});
|
|
||||||
});
|
function checkBucket(callback) {
|
||||||
|
browser.get('https://' + app.fqdn);
|
||||||
|
|
||||||
|
pageLoaded().then(function () {
|
||||||
|
return browser.findElement(by.xpath(`//a[contains(text(), ${bucket})]`));
|
||||||
|
}).then(function () {
|
||||||
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openSettings(callback) {
|
function openSettings(callback) {
|
||||||
browser.get('https://' + app.fqdn);
|
browser.get('https://' + app.fqdn);
|
||||||
|
|
||||||
pageLoaded(function () {
|
pageLoaded().then(function () {
|
||||||
visible(by.id('top-right-menu'), function () {
|
return visible(by.id('top-right-menu'));
|
||||||
browser.findElement(by.id('top-right-menu')).click();
|
}).then(function () {
|
||||||
visible(by.xpath('//*[text()="Settings "]'), function () {
|
return browser.findElement(by.id('top-right-menu')).click();
|
||||||
browser.findElement(by.xpath('//*[text()="Settings "]')).click();
|
}).then(function () {
|
||||||
|
return visible(by.xpath('//*[text()="Settings "]'));
|
||||||
browser.wait(until.elementLocated(by.xpath('//*[text()="Generate"]')), TEST_TIMEOUT).then(function () { callback(); });
|
}).then(function () {
|
||||||
});
|
return browser.findElement(by.xpath('//*[text()="Settings "]')).click();
|
||||||
});
|
}).then(function () {
|
||||||
|
return browser.wait(until.elementLocated(by.xpath('//*[text()="Generate"]')), TEST_TIMEOUT);
|
||||||
|
}).then(function () {
|
||||||
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,10 +157,19 @@ describe('Application life cycle test', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can login', login);
|
it('can login', login);
|
||||||
it('can add buckets', addBucket);
|
it('can add bucket', addBucket);
|
||||||
it('can open settings', openSettings);
|
it('can open settings', openSettings);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
it('can restart app', function (done) {
|
||||||
|
execSync('cloudron restart --wait');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can login', login);
|
||||||
|
it('has bucket', checkBucket);
|
||||||
|
it('can logout', logout);
|
||||||
|
|
||||||
it('backup app', function () {
|
it('backup app', function () {
|
||||||
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
@ -153,7 +179,7 @@ describe('Application life cycle test', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can login', login);
|
it('can login', login);
|
||||||
it('can add buckets', addBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can open settings', openSettings);
|
it('can open settings', openSettings);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -166,12 +192,32 @@ describe('Application life cycle test', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can login', login);
|
it('can login', login);
|
||||||
it('can add buckets', addBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can open settings', openSettings);
|
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('uninstall app', function () {
|
it('uninstall app', function () {
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// test update
|
||||||
|
it('can install app', function () {
|
||||||
|
execSync('cloudron install --new --wait --appstore-id io.minio.cloudronapp --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
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 login', login);
|
||||||
|
it('can add buckets', addBucket);
|
||||||
|
it('can logout', logout);
|
||||||
|
it('can update', function () {
|
||||||
|
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
it('can login', login);
|
||||||
|
it('has bucket', checkBucket);
|
||||||
|
it('can logout', logout);
|
||||||
|
it('uninstall app', function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue