MCPcopy Index your code
hub / github.com/devspace-sh/devspace / TestParseImages

Function TestParseImages

cmd/init_test.go:16–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14}
15
16func TestParseImages(t *testing.T) {
17 testCases := []parseImagesTestCase{
18 {
19 name: `Single`,
20 manifests: `
21apiVersion: apps/v1
22kind: Deployment
23metadata:
24 name: "new"
25 labels:
26 "app.kubernetes.io/name": "devspace-app"
27 "app.kubernetes.io/component": "test"
28 "app.kubernetes.io/managed-by": "Helm"
29spec:
30 replicas: 1
31 strategy:
32 type: Recreate
33 selector:
34 matchLabels:
35 "app.kubernetes.io/name": "devspace-app"
36 "app.kubernetes.io/component": "test"
37 "app.kubernetes.io/managed-by": "Helm"
38 template:
39 metadata:
40 labels:
41 "app.kubernetes.io/name": "devspace-app"
42 "app.kubernetes.io/component": "test"
43 "app.kubernetes.io/managed-by": "Helm"
44 spec:
45 containers:
46 - image: "username/app"
47 name: "container-0"
48`,
49 expected: []string{
50 "username/app",
51 },
52 },
53 {
54 name: `Multiple`,
55 manifests: `
56---
57# Source: my-app/templates/service.yaml
58apiVersion: v1
59kind: Service
60metadata:
61 name: php
62 labels:
63 release: "test-helm"
64spec:
65 ports:
66 - port: 80
67 protocol: TCP
68 selector:
69 release: "test-helm"
70---
71# Source: my-app/templates/deployment.yaml
72apiVersion: apps/v1
73kind: Deployment

Callers

nothing calls this directly

Calls 1

parseImagesFunction · 0.85

Tested by

no test coverage detected