mirror of
https://git.cloudron.io/cloudron/minio-app
synced 2025-09-13 00:15:40 +00:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9a18f50342 | ||
|
fc97bcedae | ||
|
a2f6725f98 | ||
|
1b03bf232f | ||
|
9d08c703e9 | ||
|
3b2df1b8a1 | ||
|
e4e84d7a26 | ||
|
3aa0241db8 | ||
|
4dc396041e | ||
|
027524dbd3 | ||
|
4379518d6c | ||
|
89b872c1c8 | ||
|
d82a5dfef3 | ||
|
50b82d8b57 |
25
CHANGELOG
25
CHANGELOG
@@ -10,3 +10,28 @@
|
||||
[0.2.1]
|
||||
* Updated to 2017-02-16T01-47-30Z
|
||||
* This version fixes the settings bug
|
||||
|
||||
[0.2.2]
|
||||
* New base image 0.10.0
|
||||
|
||||
[0.2.3]
|
||||
* Updated to 2017-03-16T21-50-32Z
|
||||
|
||||
[0.2.4]
|
||||
* Updated to 2017-04-25T01-27-49Z
|
||||
|
||||
[0.2.5]
|
||||
* Updated to 2017-04-29T00-40-27Z
|
||||
|
||||
[0.2.6]
|
||||
* Updated to 2017-05-05T01-14-51Z
|
||||
|
||||
[0.2.7]
|
||||
* 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
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "Distributed object storage",
|
||||
"version": "0.2.1",
|
||||
"version": "1.0.0",
|
||||
"healthCheckPath": "/minio/login",
|
||||
"httpPort": 8000,
|
||||
"addons": {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
This app packages Minio 2017-01-25T03-14-52Z.
|
||||
This app packages Minio <upstream>2017-08-05T00-00-53Z</upstream>.
|
||||
|
||||
Minio is a distributed object storage server built for cloud applications and devops.
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
FROM cloudron/base:0.9.0
|
||||
FROM cloudron/base:0.10.0
|
||||
MAINTAINER Minio Developers <support@cloudron.io>
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENV VERSION 2017-02-16T01-47-30Z
|
||||
ENV VERSION 2017-08-05T00-00-53Z
|
||||
|
||||
RUN mkdir -p /app/code \
|
||||
&& wget https://dl.minio.io/server/minio/release/linux-amd64/archive/minio.RELEASE.${VERSION} -O /app/code/minio \
|
||||
&& wget https://dl.minio.io/server/minio/release/linux-amd64/minio.RELEASE.${VERSION} -O /app/code/minio \
|
||||
&& chmod +x /app/code/minio
|
||||
|
||||
WORKDIR /app/code
|
||||
|
@@ -6,7 +6,7 @@ This repository contains the Cloudron app package source for [Minio](http://www.
|
||||
|
||||
[](https://cloudron.io/button.html?app=io.minio.cloudronapp)
|
||||
|
||||
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
|
||||
or using the [Cloudron command line tooling](https://git.cloudron.io/cloudron/cloudron-cli/)
|
||||
|
||||
```
|
||||
cloudron install --appstore-id io.minio.cloudronapp
|
||||
@@ -14,7 +14,7 @@ cloudron install --appstore-id io.minio.cloudronapp
|
||||
|
||||
## Building
|
||||
|
||||
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
|
||||
The app package can be built using the [Cloudron command line tooling](https://git.cloudron.io/cloudron/cloudron-cli/).
|
||||
|
||||
```
|
||||
cd minio-app
|
||||
@@ -31,7 +31,6 @@ The e2e tests are located in the `test/` folder and require [nodejs](http://node
|
||||
cd minio-app/test
|
||||
|
||||
npm install
|
||||
export PATH=$PATH:node_modules/.bin
|
||||
mocha --bail test.js
|
||||
PATH=$PATH:node_modules/.bin mocha --bail test.js
|
||||
```
|
||||
|
||||
|
162
test/test.js
162
test/test.js
@@ -13,9 +13,7 @@ var by = webdriver.By,
|
||||
var accessKey = 'admin',
|
||||
secretKey = 'secretkey';
|
||||
|
||||
var bucket_prefix = 'bucket',
|
||||
bucket_id = 0,
|
||||
bucket;
|
||||
var bucket = 'cloudrontestbucket';
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
@@ -41,85 +39,104 @@ describe('Application life cycle test', function () {
|
||||
done();
|
||||
});
|
||||
|
||||
var LOCATION = 'minio-test';
|
||||
var LOCATION = 'test';
|
||||
var TEST_TIMEOUT = 10000;
|
||||
var app;
|
||||
|
||||
function pageLoaded(callback) {
|
||||
return browser.wait(until.elementLocated(by.className('page-load pl-0 pl-1')), TEST_TIMEOUT).then(function () {
|
||||
callback();
|
||||
});
|
||||
function pageLoaded() {
|
||||
return browser.wait(until.elementLocated(by.className('page-load pl-0 pl-1')), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
function visible(selector, callback) {
|
||||
function visible(selector) {
|
||||
return browser.wait(until.elementLocated(selector), TEST_TIMEOUT).then(function () {
|
||||
browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT).then(function () {
|
||||
callback();
|
||||
});
|
||||
return browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT);
|
||||
});
|
||||
}
|
||||
|
||||
function login(callback) {
|
||||
browser.manage().deleteAllCookies();
|
||||
browser.get('https://' + app.fqdn);
|
||||
|
||||
visible(by.id('accessKey'), function () {
|
||||
browser.findElement(by.id('accessKey')).sendKeys(accessKey);
|
||||
browser.findElement(by.id('secretKey')).sendKeys(secretKey);
|
||||
browser.findElement(by.className('lw-btn')).click();
|
||||
browser.wait(until.elementLocated(by.id('top-right-menu')), TEST_TIMEOUT).then(function () { callback(); });
|
||||
browser.get('https://' + app.fqdn).then(function () {
|
||||
return visible(by.id('accessKey'));
|
||||
}).then(function () {
|
||||
return browser.findElement(by.id('accessKey')).sendKeys(accessKey);
|
||||
}).then(function () {
|
||||
return browser.findElement(by.id('secretKey')).sendKeys(secretKey);
|
||||
}).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) {
|
||||
browser.get('https://' + app.fqdn);
|
||||
|
||||
pageLoaded(function () {
|
||||
visible(by.id('top-right-menu'), function () {
|
||||
browser.findElement(by.id('top-right-menu')).click();
|
||||
visible(by.xpath('//*[text()="Sign Out "]'), function () {
|
||||
browser.findElement(by.xpath('//*[text()="Sign Out "]')).click();
|
||||
|
||||
browser.wait(until.elementLocated(by.id('accessKey')), TEST_TIMEOUT).then(function () { callback(); });
|
||||
});
|
||||
});
|
||||
pageLoaded().then(function () {
|
||||
return visible(by.id('top-right-menu'));
|
||||
}).then(function () {
|
||||
return browser.findElement(by.id('top-right-menu')).click();
|
||||
}).then(function () {
|
||||
return visible(by.xpath('//*[text()="Sign Out "]'));
|
||||
}).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) {
|
||||
bucket_id = bucket_id + 1;
|
||||
bucket = bucket_prefix + bucket_id;
|
||||
browser.get('https://' + app.fqdn);
|
||||
|
||||
pageLoaded(function () {
|
||||
visible(by.className('fa fa-plus'), function () {
|
||||
browser.findElement(by.className('fa fa-plus')).click();
|
||||
visible(by.className('fa fa-hdd-o'), function () {
|
||||
browser.findElement(by.className('fa fa-hdd-o')).click();
|
||||
visible(by.xpath('//*[@class="modal-body"]/form/div/input'), function() {
|
||||
browser.findElement(by.xpath('//*[@class="modal-body"]/form/div/input')).sendKeys(bucket);
|
||||
browser.findElement(by.xpath('//*[@class="modal-body"]/form')).submit();
|
||||
visible(by.xpath('//*[@class="main"]/a[text()="' + bucket + '"]'), function() {
|
||||
callback();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
pageLoaded().then(function () {
|
||||
return visible(by.className('fa fa-plus'));
|
||||
}).then(function () {
|
||||
return browser.findElement(by.className('fa fa-plus')).click();
|
||||
}).then(function () {
|
||||
return visible(by.className('fa fa-hdd-o'));
|
||||
}).then(function () {
|
||||
return browser.findElement(by.className('fa fa-hdd-o')).click();
|
||||
}).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();
|
||||
});
|
||||
}
|
||||
|
||||
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) {
|
||||
browser.get('https://' + app.fqdn);
|
||||
|
||||
pageLoaded(function () {
|
||||
visible(by.id('top-right-menu'), function () {
|
||||
browser.findElement(by.id('top-right-menu')).click();
|
||||
visible(by.xpath('//*[text()="Settings "]'), function () {
|
||||
browser.findElement(by.xpath('//*[text()="Settings "]')).click();
|
||||
|
||||
browser.wait(until.elementLocated(by.xpath('//*[text()="Generate"]')), TEST_TIMEOUT).then(function () { callback(); });
|
||||
});
|
||||
});
|
||||
pageLoaded().then(function () {
|
||||
return visible(by.id('top-right-menu'));
|
||||
}).then(function () {
|
||||
return browser.findElement(by.id('top-right-menu')).click();
|
||||
}).then(function () {
|
||||
return visible(by.xpath('//*[text()="Settings "]'));
|
||||
}).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 add buckets', addBucket);
|
||||
it('can add bucket', addBucket);
|
||||
it('can open settings', openSettings);
|
||||
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 () {
|
||||
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
@@ -153,25 +179,45 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
|
||||
it('can login', login);
|
||||
it('can add buckets', addBucket);
|
||||
it('has bucket', checkBucket);
|
||||
it('can open settings', openSettings);
|
||||
it('can logout', logout);
|
||||
|
||||
it('move to different location', function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
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');
|
||||
});
|
||||
|
||||
it('can login', login);
|
||||
it('can add buckets', addBucket);
|
||||
it('can open settings', openSettings);
|
||||
it('has bucket', checkBucket);
|
||||
it('can logout', logout);
|
||||
|
||||
it('uninstall app', function () {
|
||||
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' });
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user