(t *testing.T)
| 246 | } |
| 247 | |
| 248 | func TestLongAppName(t *testing.T) { |
| 249 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) |
| 250 | defer cancel() |
| 251 | |
| 252 | // Container names can be very long since we use container IDs for proxy targeting. |
| 253 | // This test verifies that long app names work correctly. |
| 254 | longName := strings.Repeat("x", 200) |
| 255 | |
| 256 | ns, err := docker.NewNamespace("once-long-name-test") |
| 257 | require.NoError(t, err) |
| 258 | defer ns.Teardown(ctx, true) |
| 259 | |
| 260 | require.NoError(t, ns.EnsureNetwork(ctx)) |
| 261 | require.NoError(t, ns.Proxy().Boot(ctx, getProxyPorts(t))) |
| 262 | |
| 263 | deployApp(t, ctx, ns, docker.ApplicationSettings{ |
| 264 | Name: longName, |
| 265 | Image: "ghcr.io/basecamp/once-campfire:main", |
| 266 | Host: "longname.localhost", |
| 267 | }) |
| 268 | |
| 269 | ns2, err := docker.RestoreNamespace(ctx, "once-long-name-test") |
| 270 | require.NoError(t, err) |
| 271 | |
| 272 | restoredApp := ns2.Application(longName) |
| 273 | require.NotNil(t, restoredApp) |
| 274 | assert.Equal(t, longName, restoredApp.Settings.Name) |
| 275 | } |
| 276 | |
| 277 | func TestContainerLogConfig(t *testing.T) { |
| 278 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) |
nothing calls this directly
no test coverage detected
searching dependent graphs…