From 0604e2c2c6d2cbb3349a7a73b29027f8c0834134 Mon Sep 17 00:00:00 2001 From: Ardika Bagus Date: Wed, 4 Oct 2023 20:44:10 +0700 Subject: [PATCH] chore: remove unnecessary code, and use assert for consistency Signed-off-by: Ardika Bagus --- go.work.sum | 2 ++ .../HelmChartInflationGenerator_test.go | 3 +-- plugin/builtin/helmchartinflationgenerator/go.mod | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.work.sum b/go.work.sum index c45effe3b95..4fb462a86b4 100644 --- a/go.work.sum +++ b/go.work.sum @@ -44,6 +44,8 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= diff --git a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go index 965d1379bb2..5c7d56673b4 100644 --- a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go +++ b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go @@ -10,7 +10,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest" ) @@ -737,7 +736,7 @@ func TestHelmChartInflationGeneratorWithLocalChartWithVersion(t *testing.T) { } err := th.GetFSys().MkdirAll(filepath.Join(th.GetRoot(), "charts/dummy/templates")) - require.NoError(t, err) + assert.NoError(t, err) th.WriteF(filepath.Join(th.GetRoot(), "charts/dummy/Chart.yaml"), ` apiVersion: v1 diff --git a/plugin/builtin/helmchartinflationgenerator/go.mod b/plugin/builtin/helmchartinflationgenerator/go.mod index ef9b9e26012..e6068b9b0f6 100644 --- a/plugin/builtin/helmchartinflationgenerator/go.mod +++ b/plugin/builtin/helmchartinflationgenerator/go.mod @@ -4,6 +4,7 @@ go 1.20 require ( github.com/imdario/mergo v0.3.6 + github.com/stretchr/testify v1.8.1 sigs.k8s.io/kustomize/api v0.14.0 sigs.k8s.io/kustomize/kyaml v0.14.3 sigs.k8s.io/yaml v1.3.0 @@ -25,7 +26,6 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.8.1 // indirect github.com/xlab/treeprint v1.2.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/sys v0.8.0 // indirect