MCPcopy Index your code
hub / github.com/docker/cli / TestConvertFileObjectDefaults

Function TestConvertFileObjectDefaults

cli/compose/convert/service_test.go:493–509  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

491}
492
493func TestConvertFileObjectDefaults(t *testing.T) {
494 namespace := NewNamespace("testing")
495 config := composetypes.FileReferenceConfig{Source: "source"}
496 swarmRef, err := convertFileObject(namespace, config, lookupConfig)
497 assert.NilError(t, err)
498
499 expected := swarmReferenceObject{
500 Name: "testing_source",
501 File: swarmReferenceTarget{
502 Name: config.Source,
503 UID: "0",
504 GID: "0",
505 Mode: os.FileMode(0o444),
506 },
507 }
508 assert.Check(t, is.DeepEqual(expected, swarmRef))
509}
510
511func TestServiceConvertsIsolation(t *testing.T) {
512 src := composetypes.ServiceConfig{

Callers

nothing calls this directly

Calls 2

NewNamespaceFunction · 0.85
convertFileObjectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…