How to use the @google-cloud/compute.prototype function in @google-cloud/compute

To help you get started, we’ve selected a few @google-cloud/compute examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudfoundry-incubator / service-fabrik-broker / test / test_broker / iaas.GcpClient.spec.js View on Github external
it('disk create should fail if promise throws', function () {
        sandbox.restore();
        sandbox.stub(GcpCompute.prototype, 'zone').returns(zoneFailedStub);

        return client.createDiskFromSnapshot(snapshotName, zone)
          .then(() => {
            throw new Error('expected disk create request to fail');
          })
          .catch(err => expect(err.message).to.eql(createDiskFailedMsg));
      });
github cloudfoundry-incubator / service-fabrik-broker / test / test_broker / iaas.GcpClient.spec.js View on Github external
beforeEach(function () {
        sandbox = sinon.createSandbox();
        client = new GcpClient(settings);
        sandbox.stub(GcpCompute.prototype, 'snapshot').returns(snapshotStub);
        sandbox.stub(GcpCompute.prototype, 'zone').returns(zoneStub);
        sandbox.stub(GcpClient.prototype, 'getRandomDiskId').returns(diskName);
      });
      afterEach(function () {

@google-cloud/compute

Google Compute Engine Client Library for Node.js

Apache-2.0
Latest version published 16 days ago

Package Health Score

92 / 100
Full package analysis

Popular @google-cloud/compute functions