viewtest

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package viewtest builds view.Executor instances for integration tests.

Helpers here are scoped to patient_summary_view with Jane/John fixtures from pkg/testkit/fixtures. Use ExecutorConfig when tests need a pre-seeded store or ProfileCatalog for Parquet-on-FHIR layout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPatientSummaryExecutor

func NewPatientSummaryExecutor(t *testing.T, patients PatientSummaryPatients) *view.Executor

NewPatientSummaryExecutor seeds patients and returns an executor for patient_summary_view.

func NewPatientSummaryExecutorWithConfig

func NewPatientSummaryExecutorWithConfig(t *testing.T, patients PatientSummaryPatients, cfg ExecutorConfig) *view.Executor

NewPatientSummaryExecutorWithConfig builds a patient_summary_view executor. When cfg.Resources is set, patients are not seeded into a new store.

Types

type ExecutorConfig

type ExecutorConfig struct {
	Resources      store.ResourceStore
	ProfileCatalog validate.ProfileCatalog
}

ExecutorConfig optionally overrides the seeded store or adds ProfileCatalog.

type PatientSummaryPatients

type PatientSummaryPatients struct {
	Jane *types.ResourceEnvelope
	John *types.ResourceEnvelope
}

PatientSummaryPatients holds Jane and John envelopes for patient_summary_view tests.

func DefaultPatientSummaryPatients

func DefaultPatientSummaryPatients(t *testing.T) PatientSummaryPatients

DefaultPatientSummaryPatients returns Jane and John without LastUpdated overrides.

func IncrementalPatientSummaryPatients

func IncrementalPatientSummaryPatients(t *testing.T) PatientSummaryPatients

IncrementalPatientSummaryPatients returns Jane and John with distinct LastUpdated values for incremental export and watermark tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL