garage-admin-sdk-js/test/api/BucketApi.spec.js

174 lines
6.0 KiB
JavaScript

/**
* Garage Administration API v0+garage-v0.8.0
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
*
* The version of the OpenAPI document: v0.8.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require(process.cwd()+'/src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.garage);
}
}(this, function(expect, garage) {
'use strict';
var instance;
beforeEach(function() {
instance = new garage.BucketApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('BucketApi', function() {
describe('allowBucketKey', function() {
it('should call allowBucketKey successfully', function(done) {
//uncomment below and update the code to test allowBucketKey
//instance.allowBucketKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('createBucket', function() {
it('should call createBucket successfully', function(done) {
//uncomment below and update the code to test createBucket
//instance.createBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucket', function() {
it('should call deleteBucket successfully', function(done) {
//uncomment below and update the code to test deleteBucket
//instance.deleteBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucketGlobalAlias', function() {
it('should call deleteBucketGlobalAlias successfully', function(done) {
//uncomment below and update the code to test deleteBucketGlobalAlias
//instance.deleteBucketGlobalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteBucketLocalAlias', function() {
it('should call deleteBucketLocalAlias successfully', function(done) {
//uncomment below and update the code to test deleteBucketLocalAlias
//instance.deleteBucketLocalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('denyBucketKey', function() {
it('should call denyBucketKey successfully', function(done) {
//uncomment below and update the code to test denyBucketKey
//instance.denyBucketKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('findBucketInfo', function() {
it('should call findBucketInfo successfully', function(done) {
//uncomment below and update the code to test findBucketInfo
//instance.findBucketInfo(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getBucketInfo', function() {
it('should call getBucketInfo successfully', function(done) {
//uncomment below and update the code to test getBucketInfo
//instance.getBucketInfo(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('listBuckets', function() {
it('should call listBuckets successfully', function(done) {
//uncomment below and update the code to test listBuckets
//instance.listBuckets(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('putBucketGlobalAlias', function() {
it('should call putBucketGlobalAlias successfully', function(done) {
//uncomment below and update the code to test putBucketGlobalAlias
//instance.putBucketGlobalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('putBucketLocalAlias', function() {
it('should call putBucketLocalAlias successfully', function(done) {
//uncomment below and update the code to test putBucketLocalAlias
//instance.putBucketLocalAlias(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateBucket', function() {
it('should call updateBucket successfully', function(done) {
//uncomment below and update the code to test updateBucket
//instance.updateBucket(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));