Remove starlark support

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2024-09-23 16:52:05 -04:00
parent 88f19bffa9
commit d32eacf034
91 changed files with 285 additions and 2410 deletions

View File

@@ -157,55 +157,6 @@ kind: Foo
apiVersion: v1
`,
},
{
name: "star",
args: []string{"run", "dir",
"--enable-star",
"--star-path", "a/b/c",
"--star-name", "foo",
"--", "Foo", "g=h"},
path: "dir",
expected: `
metadata:
name: function-input
annotations:
config.kubernetes.io/function: |
starlark: {path: a/b/c, name: foo}
data: {g: h}
kind: Foo
apiVersion: v1
`,
},
{
name: "star-not-enabled",
args: []string{"run", "dir",
"--star-path", "a/b/c",
"--star-name", "foo",
"--", "Foo", "g=h"},
path: "dir",
err: "must specify --enable-star with --star-path",
},
{
name: "image-star-not-enabled",
args: []string{"run", "dir",
"--image", "some_image",
"--star-path", "a/b/c",
"--star-name", "foo",
"--", "Foo", "g=h"},
path: "dir",
err: "must specify --enable-star with --star-path",
},
{
name: "star-enabled",
args: []string{"run", "dir", "--enable-star"},
path: "dir",
expectedStruct: &runfn.RunFns{
Path: "dir",
EnableStarlark: true,
Env: []string{},
WorkingDir: wd,
},
},
{
name: "function paths",
args: []string{"run", "dir", "--fn-path", "path1", "--fn-path", "path2"},