(t *testing.T)
| 183 | } |
| 184 | |
| 185 | func TestDisplayLocationRemoteStack(t *testing.T) { |
| 186 | ctrl := gomock.NewController(t) |
| 187 | defer ctrl.Finish() |
| 188 | cli := mocks.NewMockCli(ctrl) |
| 189 | |
| 190 | buf := new(bytes.Buffer) |
| 191 | cli.EXPECT().Out().Return(streams.NewOut(buf)).AnyTimes() |
| 192 | |
| 193 | project := &types.Project{ |
| 194 | Name: "test-project", |
| 195 | WorkingDir: "/tmp/test", |
| 196 | } |
| 197 | |
| 198 | options := buildOptions{ |
| 199 | ProjectOptions: &ProjectOptions{ |
| 200 | ConfigPaths: []string{"oci://registry.example.com/stack:latest"}, |
| 201 | }, |
| 202 | } |
| 203 | |
| 204 | displayLocationRemoteStack(cli, project, options) |
| 205 | |
| 206 | output := buf.String() |
| 207 | assert.Equal(t, output, fmt.Sprintf("Your compose stack %q is stored in %q\n", "oci://registry.example.com/stack:latest", "/tmp/test")) |
| 208 | } |
| 209 | |
| 210 | func TestDisplayInterpolationVariables(t *testing.T) { |
| 211 | ctrl := gomock.NewController(t) |
nothing calls this directly
no test coverage detected