MCPcopy Create free account
hub / github.com/dagger/dagger / TestDescription

Method TestDescription

core/integration/module_test.go:78–291  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

76}
77
78func (ModuleSuite) TestDescription(ctx context.Context, t *testctx.T) {
79 type source struct {
80 file string
81 contents string
82 }
83 for i, tc := range []struct {
84 sdk string
85 sources []source
86 }{
87 {
88 sdk: "go",
89 sources: []source{
90 {
91 file: "main.go",
92 contents: `
93// Test module, short description
94//
95// Long description, with full sentences.
96
97package main
98
99// Test object, short description
100type Test struct {
101 // +default="foo"
102 Foo string
103}
104`,
105 },
106 },
107 },
108 {
109 sdk: "go",
110 sources: []source{
111 {
112 file: "a.go",
113 contents: `
114// First, but not main
115package main
116
117type Foo struct {}
118`,
119 },
120 {
121 file: "z.go",
122 contents: `
123// Test module, short description
124//
125// Long description, with full sentences.
126
127package main
128
129// Test object, short description
130 type Test struct {
131}
132
133func (*Test) Foo() Foo {
134 return Foo{}
135}

Callers

nothing calls this directly

Calls 15

daggerCliFileFunction · 0.85
daggerExecFunction · 0.85
connectFunction · 0.70
inspectModuleFunction · 0.70
RunMethod · 0.65
EqualMethod · 0.65
StringMethod · 0.65
GetMethod · 0.65
WithWorkdirMethod · 0.45
WithMountedFileMethod · 0.45
FromMethod · 0.45
ContainerMethod · 0.45

Tested by

no test coverage detected