Skip to content

Commit

Permalink
[env] Fix go linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Fricounet committed Apr 26, 2024
1 parent 95976f7 commit 56e4a65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,11 @@ func (e *testEnv) deepCopyConfig() *envconf.Config {
// Manually setting fields that are struct types
if client := e.cfg.GetClient(); client != nil {
// Need to recreate the underlying client because client.Resource is not thread safe
clientCopy, _ := klient.New(client.RESTConfig())
// Panic on error because this should never happen since the client was built once already
clientCopy, err := klient.New(client.RESTConfig())
if err != nil {
panic(err)
}
configCopy.WithClient(clientCopy)
}
if e.cfg.AssessmentRegex() != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ func TestTestEnv_TestInParallel(t *testing.T) {
var envTForChildCfgParallelTesting = NewWithConfig(envconf.New().WithParallelTestEnabled().WithNamespace("child-cfg"))

func TestTestEnv_ChildCfgInParallel(t *testing.T) {

envTForChildCfgParallelTesting.BeforeEachTest(func(ctx context.Context, config *envconf.Config, t *testing.T) (context.Context, error) {
t.Logf("Running before each test for test %s", t.Name())
t.Parallel()
Expand Down

0 comments on commit 56e4a65

Please sign in to comment.