1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-06 17:40:58 +00:00

integration test

This commit is contained in:
Casey Lee 2020-02-24 12:48:12 -08:00
parent 72682352a6
commit ff9f2a8c94
12 changed files with 94 additions and 73 deletions

View file

@ -60,3 +60,16 @@ func TestStopCommands(t *testing.T) {
handler("::set-env name=x::abcd\n")
assert.Equal("abcd", rc.Env["x"])
}
func TestAddpathADO(t *testing.T) {
assert := assert.New(t)
ctx := context.Background()
rc := new(RunContext)
handler := rc.commandHandler(ctx)
handler("##[add-path]/zoo\n")
assert.Equal("/zoo", rc.ExtraPath[0])
handler("##[add-path]/boo\n")
assert.Equal("/boo", rc.ExtraPath[1])
}