Do not cache box and user config
this is not needed anymore since webadmin does not keep polling this
This commit is contained in:
@@ -29,6 +29,7 @@ var USERNAME_1 = 'userTheFirst', EMAIL_1 = 'taO@zen.mac', userId_1, token_1;
|
||||
function setup(done) {
|
||||
nock.cleanAll();
|
||||
config._reset();
|
||||
config.set('provider', 'caas');
|
||||
config.setFqdn('example-cloudron-test.com');
|
||||
config.setAdminFqdn('my.example-cloudron-test.com');
|
||||
|
||||
@@ -36,7 +37,8 @@ function setup(done) {
|
||||
server.start.bind(server),
|
||||
database._clear,
|
||||
settings.setBackupConfig.bind(null, { provider: 'filesystem', backupFolder: '/tmp', format: 'tgz' }),
|
||||
settingsdb.set.bind(null, settings.APPSTORE_CONFIG_KEY, JSON.stringify({ userId: 'USER_ID', cloudronId: 'CLOUDRON_ID', token: 'ACCESS_TOKEN' }))
|
||||
settingsdb.set.bind(null, settings.APPSTORE_CONFIG_KEY, JSON.stringify({ userId: 'USER_ID', cloudronId: 'CLOUDRON_ID', token: 'ACCESS_TOKEN' })),
|
||||
settingsdb.set.bind(null, settings.CAAS_CONFIG_KEY, JSON.stringify({ boxId: 'BOX_ID', token: 'ACCESS_TOKEN2' }))
|
||||
], done);
|
||||
}
|
||||
|
||||
@@ -258,7 +260,7 @@ describe('Cloudron', function () {
|
||||
|
||||
it('succeeds (admin)', function (done) {
|
||||
var scope = nock(config.apiServerOrigin())
|
||||
.get(`/api/v1/boxes/${config.fqdn()}?token=${config.token()}`)
|
||||
.get('/api/v1/boxes/BOX_ID?token=ACCESS_TOKEN2')
|
||||
.reply(200, { box: { region: 'sfo', size: '1gb' }, user: { }});
|
||||
|
||||
superagent.get(SERVER_URL + '/api/v1/cloudron/config')
|
||||
|
||||
Reference in New Issue
Block a user