(t *testing.T)
| 99 | } |
| 100 | |
| 101 | func TestStackServicesWithFormat(t *testing.T) { |
| 102 | cli := test.NewFakeCli(&fakeClient{ |
| 103 | serviceListFunc: func(options client.ServiceListOptions) (client.ServiceListResult, error) { |
| 104 | return client.ServiceListResult{ |
| 105 | Items: []swarm.Service{*builders.Service(builders.ServiceName("service-name-foo"))}, |
| 106 | }, nil |
| 107 | }, |
| 108 | }) |
| 109 | cmd := newServicesCommand(cli) |
| 110 | cmd.SetArgs([]string{"foo"}) |
| 111 | assert.Check(t, cmd.Flags().Set("format", "{{ .Name }}")) |
| 112 | assert.NilError(t, cmd.Execute()) |
| 113 | golden.Assert(t, cli.OutBuffer().String(), "stack-services-with-format.golden") |
| 114 | } |
| 115 | |
| 116 | func TestStackServicesWithConfigFormat(t *testing.T) { |
| 117 | cli := test.NewFakeCli(&fakeClient{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…