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

Function TestServiceHash

pkg/compose/hash_test.go:26–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestServiceHash(t *testing.T) {
27 hash1, err := ServiceHash(serviceConfig(1))
28 assert.NilError(t, err)
29 hash2, err := ServiceHash(serviceConfig(2))
30 assert.NilError(t, err)
31 assert.Equal(t, hash1, hash2)
32}
33
34func serviceConfig(replicas int) types.ServiceConfig {
35 return types.ServiceConfig{

Callers

nothing calls this directly

Calls 2

ServiceHashFunction · 0.85
serviceConfigFunction · 0.85

Tested by

no test coverage detected