Skip to content

Commit

Permalink
fix the e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed May 26, 2024
1 parent 93601db commit f7ed28d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
# - name: Operator
# run: cd operator && make build

BuildImage:
E2E:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
Expand All @@ -91,7 +91,7 @@ jobs:
fi
make helm-pkg
- name: Core Image
run: GOPROXY=direct IMG_TOOL=docker make build
run: GOPROXY=direct IMG_TOOL=docker TAG=master REGISTRY=ghcr.io make image
- name: Run e2e
env:
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions pkg/runner/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import (
"context"
"errors"
"fmt"
"github.com/go-openapi/spec"
"io"
"net/http"
"strings"
"time"

"github.com/go-openapi/spec"

"github.com/andreyvit/diff"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
Expand Down Expand Up @@ -356,12 +357,12 @@ func runJob(job *testing.Job, ctx interface{}, current interface{}) (err error)
}

if program, err = expr.Compile(exprText, expr.Env(env)); err != nil {
fmt.Printf("failed to compile: %s, %v\n", item, err)
fmt.Printf("failed to compile: %q, %v\n", exprText, err)
return
}

if _, err = expr.Run(program, env); err != nil {
fmt.Printf("failed to Run: %s, %v\n", item, err)
fmt.Printf("failed to Run: %q, %v\n", exprText, err)
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testing/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func renderMap(ctx interface{}, data map[string]string, title string) (result ma
var tmpVal string
for key, val := range data {
if tmpVal, err = render.Render(title, val, ctx); err == nil {
data[key] = tmpVal
data[key] = strings.TrimSpace(tmpVal)
} else {
break
}
Expand Down

0 comments on commit f7ed28d

Please sign in to comment.