Firebase-tools: Storage emulator feature request

Created on 20 Oct 2019  ·  20Comments  ·  Source: firebase/firebase-tools

It's cool and all when github isn't the place for feature requests. But what if the feature request page isn't working?

image

We need a storage emulator so we can start testing our AutoML features locally. Are there any workarounds? Hacks? Thanks in advance,

Regards,

Jim

emulator-suite feature request

Most helpful comment

Hoping for some storage emulator love. ❤️ 🤖

All 20 comments

PIng @samtstern as he has done a lot with the emulators.

Sorry to hear about the request page not working (and sorry for the super late response). It probably was a transient issue if you'd like to try again...

Thanks for this! We are also interested in a Storage emulator, but no timeline to share right now.

Hoping for some storage emulator love. ❤️ 🤖

I'd like to debug and test a storage function onFinalize, but seems it still not possible:

functions[generateThumbnail]: function ignored because the storage emulator does not exist or is not running.

How can I debug a onFinalize function locally without the storage emulator?
Is there any way to create unit tests for storage functions?

@davigp you can use functions:shell to test those functions interactively or you can use the firebase-functions-test library to write unit tests.

Any news on this? Sounds really cool

Hi folks, thanks for the interest! We're considering this, internal tracking bug b/159057998

@samtstern

functions-testing

can you link the repo? Do you mean the firebase-functions-test library?

@vanities yes sorry that's what I meant, there are some examples here:
https://github.com/firebase/quickstart-testing

@samtstern
No worries, thanks again! Hoping we can get emulator testing for storage and functions, the emulator is so useful!

We are also interested in a storage emulator! Why wasn't this thought of? If so, if they couldn't do it why not just get ahead of it and post a blog post explaining the difficulties?

The Firestore emulator lets us test our security rules in a automated way on every build (https://firebase.google.com/docs/firestore/security/test-rules-emulator?hl=en) and on developer computers in one click, without any credentials or anything

Having the same workflow/feature for storage security rules would be awesome.

Automated and easy security testing is a game changer for me, I hope it will expand to storage as well 👍

We are also in need of the same awesome emulator testing feature for storage rules. Please push this request in its priority :100: ;)

+1 this would be awesome!

@samtstern After authentication emulator, this one will be the next? :)

I'd love a storage emulator! :D

Firebase Storage is like the heart of firebase when we have projects dealing with storing images, videos etc. Once we get this in an Emulator then that would be a huge relief. Waiting for its release.

It's awkward to handle two different credentials, one for the emulator suite and another one when accessing firebase storage.
What is the time frame for making the storage emulator available? A month from now, before end of year or first next year?

@ribomation sorry we can't offer any timelines but I can say definitely longer than a month!

Hi all - I would also love this emulator. In the meantime, is there a way I can avoid deleting live storage files and folders when running hosting / functions in the emulator?

For example I use the following code to delete all the files in a folder. Last night someone accidentally deleted all the documents in our emulator as part of a test and it deleted all the LIVE storage folders as we use an import of real documents into our emulator 🤦

async function deleteStorageFolder(path:string) {
  const bucket = admin.storage().bucket();
  return bucket.deleteFiles({
    prefix: path
  })

Is there any way I can tell firebase to avoid using the production storage APIs when emulators are running?

Was this page helpful?
0 / 5 - 0 ratings