Skip to content

Make InspectionDataStoreService easier to mock #273

@kyasbal

Description

@kyasbal

Many frontend Services uses KHI inspection data uses InspectionDataStoreService and its injected at the root level. It implements an interface InspectionDataStore but it's not used for referencing the dependency thus it's not easy to test services using the store.

Refactor this file https://github.com/GoogleCloudPlatform/khi/blob/main/web/src/app/services/inspection-data-store.service.ts#L68 and all of its dependency must use it from its interface. In addition to this change, we must create a mock utility to create InspectionDataStoreService instance since it can contain a lot of data and it makes harder to mock even with small set of test data.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions