Skip to content

Commit fe412be

Browse files
committed
Fixed review issues
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
1 parent 2c4093a commit fe412be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/utils/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const (
5858
defaultInterval = time.Millisecond * 250
5959
)
6060

61+
// TestConfig groups various fields together for use in the test helpers
6162
type TestConfig struct {
6263
Context context.Context
6364
KubeCli *kubernetes.Clientset
@@ -71,6 +72,7 @@ type TestConfig struct {
7172
Interval time.Duration
7273
}
7374

75+
// NewTestConfig creates a new TestConfig instance
7476
func NewTestConfig(nsName string) *TestConfig {
7577
cfg := config.GetConfigOrDie()
7678
gomega.Expect(cfg).NotTo(gomega.BeNil())
@@ -92,6 +94,7 @@ func NewTestConfig(nsName string) *TestConfig {
9294
}
9395
}
9496

97+
// CreateCli creates the Kubernetes client used in the tests, invoked after the scheme has been setup.
9598
func (testConfig *TestConfig) CreateCli() {
9699
var err error
97100
testConfig.K8sClient, err = client.New(testConfig.RestConfig, client.Options{Scheme: testConfig.Scheme})
@@ -436,6 +439,7 @@ func CreateObjsFromYaml(testConfig *TestConfig, docs []string) []string {
436439
return objNames
437440
}
438441

442+
// DeleteObjects deletes set of Kubernetes objects in the form of kind/name
439443
func DeleteObjects(testConfig *TestConfig, kindAndNames []string) {
440444
for _, kindAndName := range kindAndNames {
441445
split := strings.Split(kindAndName, "/")

0 commit comments

Comments
 (0)