mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
initial support for expressons
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
7183c74cd0
commit
b8589c4e9b
10 changed files with 286 additions and 108 deletions
|
@ -33,7 +33,8 @@ func TestNewDockerRunExecutor(t *testing.T) {
|
|||
ctx := common.WithLogger(context.Background(), logger)
|
||||
|
||||
runner := NewDockerRunExecutor(NewDockerRunExecutorInput{
|
||||
Image: "hello-world",
|
||||
Image: "hello-world",
|
||||
Stdout: buf,
|
||||
})
|
||||
|
||||
puller := NewDockerPullExecutor(NewDockerPullExecutorInput{
|
||||
|
@ -44,7 +45,8 @@ func TestNewDockerRunExecutor(t *testing.T) {
|
|||
err := pipeline(ctx)
|
||||
assert.NoError(t, err)
|
||||
|
||||
expected := `docker pull hello-worlddocker run image=hello-world entrypoint=[] cmd=[]Hello from Docker!`
|
||||
actual := buf.String()
|
||||
assert.Equal(t, expected, actual[:len(expected)])
|
||||
assert.Contains(t, actual, `docker pull hello-world`)
|
||||
assert.Contains(t, actual, `docker run image=hello-world entrypoint=[] cmd=[]`)
|
||||
assert.Contains(t, actual, `Hello from Docker!`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue