MCPcopy Create free account
hub / github.com/conforma/cli / matchSnapshot

Function matchSnapshot

acceptance/cli/cli.go:777–791  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

775}
776
777func matchSnapshot(ctx context.Context) error {
778 status, err := ecStatusFrom(ctx)
779 if err != nil {
780 return err
781 }
782
783 stdout := snaps.MatchSnapshot(ctx, "stdout", status.stdout.String(), status.vars)
784 stderr := snaps.MatchSnapshot(ctx, "stderr", status.stderr.String(), status.vars)
785
786 if stdout == nil && stderr == nil {
787 return nil
788 }
789
790 return errors.Join(stdout, stderr)
791}
792
793func matchFileSnapshot(ctx context.Context, file string) error {
794 status, err := ecStatusFrom(ctx)

Callers

nothing calls this directly

Calls 3

MatchSnapshotFunction · 0.92
ecStatusFromFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected