Skip to content

Commit

Permalink
fix: delete useless code
Browse files Browse the repository at this point in the history
Signed-off-by: FogDong <[email protected]>
  • Loading branch information
FogDong committed Aug 13, 2024
1 parent 074a471 commit 8ba50b3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
with:
version: 3.1.0
kubebuilderOnly: false
kubernetesVersion: v1.21.2
kubernetesVersion: v1.28.0

- name: Run Make test
run: make test
Expand Down
2 changes: 1 addition & 1 deletion makefiles/const.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ IMG_TAG ?= latest
OS ?= linux
ARCH ?= amd64
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1
ENVTEST_K8S_VERSION = 1.28.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down
39 changes: 0 additions & 39 deletions pkg/cue/model/value/value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,45 +109,6 @@ func TestFieldPath(t *testing.T) {
}
}

// func TestValueFix(t *testing.T) {
// testCases := []struct {
// original string
// expected string
// }{
// {
// original: `
// parameter: test: _
// // comment
// y: {
// for k, v in parameter.test.p {
// "\(k)": v
// }
// }`,
// expected: `{
// parameter: {
// test: _
// }
// // comment
// y: {
// for k, v in *parameter.test.p | {} {
// "\(k)": v
// }
// }
// }`,
// },
// }
// for i, tc := range testCases {
// t.Run(fmt.Sprint(i), func(t *testing.T) {
// r := require.New(t)
// v, err := NewValue(tc.original, nil, "")
// r.NoError(err)
// b, err := format.Node(v.CueValue().Syntax(cue.Docs(true)))
// r.NoError(err)
// r.Equal(tc.expected, string(b))
// })
// }
// }

func TestSetByScript(t *testing.T) {
testCases := []struct {
name string
Expand Down
11 changes: 0 additions & 11 deletions pkg/providers/legacy/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,6 @@ func TestLog(t *testing.T) {
}
}

// func TestInstall(t *testing.T) {
// p := providers.NewProviders()
// pCtx := process.NewContext(process.ContextData{})
// pCtx.PushData(model.ContextStepName, "test-step")
// Install(p, pCtx)
// h, ok := p.GetHandler("util", "string")
// r := require.New(t)
// r.Equal(ok, true)
// r.Equal(h != nil, true)
// }

func newWorkflowContextForTest(t *testing.T) wfContext.Context {
cm := corev1.ConfigMap{}
r := require.New(t)
Expand Down
11 changes: 0 additions & 11 deletions pkg/providers/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,6 @@ func TestLog(t *testing.T) {
}
}

// func TestInstall(t *testing.T) {
// p := providers.NewProviders()
// pCtx := process.NewContext(process.ContextData{})
// pCtx.PushData(model.ContextStepName, "test-step")
// Install(p, pCtx)
// h, ok := p.GetHandler("util", "string")
// r := require.New(t)
// r.Equal(ok, true)
// r.Equal(h != nil, true)
// }

func newWorkflowContextForTest(t *testing.T) wfContext.Context {
cm := corev1.ConfigMap{}
r := require.New(t)
Expand Down

0 comments on commit 8ba50b3

Please sign in to comment.