1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

tests(runner): move arm64 test to own func (#1095)

Prevents random failing of all other runs when qemu binfmt
is not set up

Signed-off-by: Ryan <me@hackerc.at>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan 2022-04-05 17:41:36 +02:00 committed by GitHub
parent c9298d0078
commit 7ea62b593c
3 changed files with 156 additions and 157 deletions

View file

@ -13,7 +13,6 @@ import (
"github.com/nektos/act/pkg/model"
log "github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/test"
assert "github.com/stretchr/testify/assert"
yaml "gopkg.in/yaml.v3"
)
@ -26,7 +25,6 @@ func TestRunContext_EvalBool(t *testing.T) {
})
assert.NoError(t, err)
hook := test.NewGlobal()
rc := &RunContext{
Config: &Config{
Workdir: ".",
@ -157,14 +155,12 @@ func TestRunContext_EvalBool(t *testing.T) {
table := table
t.Run(table.in, func(t *testing.T) {
assertObject := assert.New(t)
defer hook.Reset()
b, err := EvalBool(rc.ExprEval, table.in)
if table.wantErr {
assertObject.Error(err)
}
assertObject.Equal(table.out, b, fmt.Sprintf("Expected %s to be %v, was %v", table.in, table.out, b))
assertObject.Empty(hook.LastEntry(), table.in)
})
}
}