Skip to content

[Question] Best Way To Modify Firebase's storage directory for testing #1507

@brianmichel

Description

@brianmichel

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website or open-source from this repo: open-source
  • Firebase C++ SDK version: 11.3.0
  • Main Firebase Components in concern: App
  • Other Firebase Components in use: Auth, Firestore
  • Platform you are using the C++ SDK on: Windows
  • Platform you are targeting: Desktop

[REQUIRED] Please describe the question here:

On macOS it's possible to override the application support directory as part of your testing suite, which in turn modifies where firebase files get stored. On Windows it looks like the SDK is using the known folder apis (

HRESULT hr = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &path);
) which is problematic when we're trying to do automated integration testing since we'd ideally like to override this folder to provide a clean slate for each test and it seems like that this machinery prevents that.

Do you have any advice on how to work around this, or if there is some other way to change the parent directory here in the testing scenario.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions