Comments (4)
I don't anticipate having an official solution for this. For offline development, you can use any HTTP request interceptor library that may exist. You can see the endpoints we hit in the source code, and if you want to log all of them:
const Storage = require('@google-cloud/storage')
const gcs = new Storage()
gcs.interceptors.push({
request: reqOpts => {
console.log(reqOpts)
return reqOpts
}
})
This will log all HTTP requests we make in the format the request
module accepts.
Also, if you pass customEndpoint: true
, it will skip the authentication step:
const Storage = require('@google-cloud/storage')
const gcs = new Storage({ customEndpoint: true })
Hopefully this is helpful. Feel free to ask any questions.
from nodejs-storage.
From @nfarina on February 13, 2017 18:40
I found that it was simple enough to create my own mock classes to emulate Google Cloud Storage just enough for my tests to pass. I posted my code to this gist in case anyone finds it useful as a starting point. Note: written in ES7 with Flow annotations.
from nodejs-storage.
From @stephenplusplus on October 20, 2016 19:52
Can you link the mock libraries? I'm not sure they'd be the same, but soon we will support using a custom endpoint which accepts the requests from our API (#1630).
from nodejs-storage.
From @arbesfeld on October 20, 2016 19:54
Here are a few :
from nodejs-storage.
Related Issues (20)
- Signed URL prefix HOT 1
- preconditions not working HOT 2
- File.save sometimes returns a Promise that never rejects or resolves HOT 10
- storage HMAC keys: should delete the key failed HOT 2
- File.save() with a Uint8Array fails HOT 9
- storage HMAC keys: should make the key INACTIVE failed HOT 4
- chore: remove internalTooling from eslint ignores once >= node 16
- How to set destination while using uploadManyFiles in TransferManager HOT 6
- Unhandled Error in startResumableUpload_ Function
- storage HMAC keys: should get metadata for an HMAC key failed HOT 1
- storage HMAC keys: should make the key INACTIVE failed HOT 1
- storage HMAC keys: should delete the key failed HOT 1
- Security vulnerability with fast-xml-parser dependency
- storage HMAC keys: should make the key INACTIVE failed HOT 3
- storage HMAC keys: should delete the key failed HOT 3
- storage: "before all" hook in "storage" failed HOT 1
- storage HMAC keys: should get metadata for an HMAC key failed
- Add an example for uploadManyFiles method HOT 2
- docs: Clarify whether setMetadata is replacing existing metadata or updating only specified fields HOT 1
- storage public access prevention enforced public access prevention behavior: object cannot be made public via ACL failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-storage.