Skip to content

Commit

Permalink
fix: Improve solver tests
Browse files Browse the repository at this point in the history
- Make FakeRESTMapper comparable
- Add Comparer for WaitTask
- Add Asserter to allow pre-configuring comparison options for Equal/NotEqual
- Update solver tests to use Asserter for task list comparison (more actionable errors)
  • Loading branch information
karlkfi committed Jan 21, 2022
1 parent dbf1979 commit 6536f94
Show file tree
Hide file tree
Showing 6 changed files with 316 additions and 243 deletions.
19 changes: 19 additions & 0 deletions pkg/apply/solver/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2021 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0

package solver

import (
"os"
"testing"

"k8s.io/klog/v2"
)

// TestMain executes the tests for this package, with optional logging.
// To see all logs, use:
// go test sigs.k8s.io/cli-utils/pkg/apply/solver -v -args -v=5
func TestMain(m *testing.M) {
klog.InitFlags(nil)
os.Exit(m.Run())
}
Loading

0 comments on commit 6536f94

Please sign in to comment.