MCPcopy Index your code
hub / github.com/cortexlabs/cortex / TestValidDockerImage

Function TestValidDockerImage

pkg/lib/regex/regex_test.go:296–611  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

294}
295
296func TestValidDockerImage(t *testing.T) {
297 testcases := []regexpMatch{
298 {
299 input: "",
300 match: false,
301 },
302 {
303 input: "short",
304 match: true,
305 },
306 {
307 input: "simple/name",
308 match: true,
309 },
310 {
311 input: "library/ubuntu",
312 match: true,
313 },
314 {
315 input: "library/ubuntu:latest",
316 match: true,
317 },
318 {
319 input: "docker/stevvooe/app",
320 match: true,
321 },
322 {
323 input: "aa/aa/aa/aa/aa/aa/aa/aa/aa/bb/bb/bb/bb/bb/bb",
324 match: true,
325 },
326 {
327 input: "aa/aa/bb/bb/bb",
328 match: true,
329 },
330 {
331 input: "a/a/a/a",
332 match: true,
333 },
334 {
335 input: "a/a/a/a/",
336 match: false,
337 },
338 {
339 input: "a//a/a",
340 match: false,
341 },
342 {
343 input: "a",
344 match: true,
345 },
346 {
347 input: "a/aa",
348 match: true,
349 },
350 {
351 input: "a/aa/a",
352 match: true,
353 },

Callers

nothing calls this directly

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected