MCPcopy Create free account
hub / github.com/docker/cli / TestVolumeInspectCluster

Function TestVolumeInspectCluster

cli/command/volume/inspect_test.go:153–258  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestVolumeInspectCluster(t *testing.T) {
154 volumeInspectFunc := func(volumeID string) (client.VolumeInspectResult, error) {
155 return client.VolumeInspectResult{
156 Volume: volume.Volume{
157 Name: "clustervolume",
158 Driver: "clusterdriver1",
159 Scope: "global",
160 ClusterVolume: &volume.ClusterVolume{
161 ID: "fooid",
162 Meta: swarm.Meta{
163 Version: swarm.Version{
164 Index: uint64(123),
165 },
166 },
167 Spec: volume.ClusterVolumeSpec{
168 Group: "group0",
169 AccessMode: &volume.AccessMode{
170 Scope: volume.ScopeMultiNode,
171 Sharing: volume.SharingAll,
172 BlockVolume: &volume.TypeBlock{},
173 },
174 AccessibilityRequirements: &volume.TopologyRequirement{
175 Requisite: []volume.Topology{
176 {
177 Segments: map[string]string{
178 "region": "R1",
179 "zone": "Z1",
180 },
181 }, {
182 Segments: map[string]string{
183 "region": "R1",
184 "zone": "Z2",
185 },
186 },
187 },
188 Preferred: []volume.Topology{
189 {
190 Segments: map[string]string{
191 "region": "R1",
192 "zone": "Z1",
193 },
194 },
195 },
196 },
197 CapacityRange: &volume.CapacityRange{
198 RequiredBytes: 1000,
199 LimitBytes: 1000000,
200 },
201 Secrets: []volume.Secret{
202 {
203 Key: "secretkey1",
204 Secret: "mysecret1",
205 }, {
206 Key: "secretkey2",
207 Secret: "mysecret2",
208 },
209 },
210 Availability: volume.AvailabilityActive,

Callers

nothing calls this directly

Calls 4

OutBufferMethod · 0.95
SetArgsMethod · 0.80
newInspectCommandFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…