Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/google/go-cmp v0.7.0
github.com/google/go-containerregistry v0.21.6
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/kptdev/krm-functions-sdk/go/fn v1.0.2
github.com/kptdev/krm-functions-sdk/go/fn v1.0.3
github.com/otiai10/copy v1.14.1
github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/kptdev/krm-functions-sdk/go/fn v1.0.2 h1:g9N6SW5axEXMagUbHliH14XpfvvvwkAVDLcN3ApVh2M=
github.com/kptdev/krm-functions-sdk/go/fn v1.0.2/go.mod h1:NSfdmtQ9AwNg5wdS9gE/H9SQs7Vomzq7E7N9hyEju1U=
github.com/kptdev/krm-functions-sdk/go/fn v1.0.3 h1:Gmkqbc2cbwJxamVoRSs409TZinuNGZaMYmNmlQcF6Bs=
github.com/kptdev/krm-functions-sdk/go/fn v1.0.3/go.mod h1:+MgNIVQMGs6WcNhQZYIbgFINnmskX8VMYcUvJBtE01M=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
41 changes: 38 additions & 3 deletions pkg/fn/runtime/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,44 @@ func TestContainerFn(t *testing.T) {
err bool
}{
{
name: "no-op function",
image: "ghcr.io/kptdev/krm-functions-catalog/no-op:latest",
output: "apiVersion: v1\nkind: ResourceList\nmetadata:\n name: output\nitems: []\n",
name: "no-op function",
image: "ghcr.io/kptdev/krm-functions-catalog/no-op:latest",
input: `apiVersion: config.kubernetes.io/v1
kind: ResourceList
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
annotations:
internal.config.kubernetes.io/index: '0'
internal.config.kubernetes.io/path: 'deployment.yaml'
- apiVersion: v1
kind: Service
metadata:
name: nginx-svc
annotations:
internal.config.kubernetes.io/index: '0'
internal.config.kubernetes.io/path: 'svc.yaml'
`,
output: `apiVersion: config.kubernetes.io/v1
kind: ResourceList
items:
- apiVersion: apps/v1
kind: Deployment
Comment thread
liamfallon marked this conversation as resolved.
metadata:
name: nginx-deployment
annotations:
internal.config.kubernetes.io/index: '0'
internal.config.kubernetes.io/path: 'deployment.yaml'
- apiVersion: v1
kind: Service
metadata:
name: nginx-svc
annotations:
internal.config.kubernetes.io/index: '0'
internal.config.kubernetes.io/path: 'svc.yaml'
`,
Comment thread
liamfallon marked this conversation as resolved.
},
{
name: "non-existing image",
Expand Down
Loading