(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestStackServicesWithConfigFormat(t *testing.T) { |
| 117 | cli := test.NewFakeCli(&fakeClient{ |
| 118 | serviceListFunc: func(options client.ServiceListOptions) (client.ServiceListResult, error) { |
| 119 | return client.ServiceListResult{ |
| 120 | Items: []swarm.Service{*builders.Service(builders.ServiceName("service-name-foo"))}, |
| 121 | }, nil |
| 122 | }, |
| 123 | }) |
| 124 | cli.SetConfigFile(&configfile.ConfigFile{ |
| 125 | ServicesFormat: "{{ .Name }}", |
| 126 | }) |
| 127 | cmd := newServicesCommand(cli) |
| 128 | cmd.SetArgs([]string{"foo"}) |
| 129 | assert.NilError(t, cmd.Execute()) |
| 130 | golden.Assert(t, cli.OutBuffer().String(), "stack-services-with-config-format.golden") |
| 131 | } |
| 132 | |
| 133 | func TestStackServicesWithoutFormat(t *testing.T) { |
| 134 | cli := test.NewFakeCli(&fakeClient{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…