garage-admin-sdk-js/test/api/KeyApi.spec.js
2022-11-13 12:28:54 +01:00

123 lines
4.1 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.KeyApi();
});
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('KeyApi', function() {
describe('addKey', function() {
it('should call addKey successfully', function(done) {
//uncomment below and update the code to test addKey
//instance.addKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteKey', function() {
it('should call deleteKey successfully', function(done) {
//uncomment below and update the code to test deleteKey
//instance.deleteKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getKey', function() {
it('should call getKey successfully', function(done) {
//uncomment below and update the code to test getKey
//instance.getKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('importKey', function() {
it('should call importKey successfully', function(done) {
//uncomment below and update the code to test importKey
//instance.importKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('listKeys', function() {
it('should call listKeys successfully', function(done) {
//uncomment below and update the code to test listKeys
//instance.listKeys(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('searchKey', function() {
it('should call searchKey successfully', function(done) {
//uncomment below and update the code to test searchKey
//instance.searchKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateKey', function() {
it('should call updateKey successfully', function(done) {
//uncomment below and update the code to test updateKey
//instance.updateKey(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));