MCPcopy
hub / github.com/docker/compose / mustResolvedServiceHash

Function mustResolvedServiceHash

pkg/compose/reconcile_test.go:920–925  ·  view source on GitHub ↗

mustResolvedServiceHash mirrors what the executor persists at create time: the service references are resolved before hashing. Use it to seed ObservedContainer.ConfigHash in tests involving network_mode/ipc/pid: service:X or volumes_from: serviceName.

(t *testing.T, svc types.ServiceConfig, containers map[string]Containers)

Source from the content-addressed store, hash-verified

918// ObservedContainer.ConfigHash in tests involving network_mode/ipc/pid:
919// service:X or volumes_from: serviceName.
920func mustResolvedServiceHash(t *testing.T, svc types.ServiceConfig, containers map[string]Containers) string {
921 t.Helper()
922 h, err := serviceHashWithResolvedRefs(svc, containers)
923 assert.NilError(t, err)
924 return h
925}

Calls 1

Tested by

no test coverage detected