Skip to content

Commit

Permalink
fix: error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bartam1 committed Jul 23, 2023
1 parent bc94ea3 commit f70db91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/e2e/pkg/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,10 @@ func (t *K8sClusterPool) FeedFomDirectory(kubeConfigDirectoryPath string) error
log.Print(err)
continue
}
k8sCluster, err := NewK8sClusterFromParams(filepath.Join(kubeConfigDirectoryPath, file.Name()), kubeContext, true)
kubectlPath := filepath.Join(kubeConfigDirectoryPath, file.Name())
k8sCluster, err := NewK8sClusterFromParams(kubectlPath, kubeContext, true)
if err != nil {
return fmt.Errorf("could not create K8sCluster: %w", err)
return fmt.Errorf("could not create K8sCluster structure from file '%s' err: %w", kubectlPath, err)
}
t.AddTestK8sClusters(k8sCluster)
}
Expand Down Expand Up @@ -360,7 +361,7 @@ type K8sClusterInfo struct {
func NewK8sCluster(kubectlOptions k8s.KubectlOptions, reusable bool) (K8sCluster, error) {
clusterInfo, err := newK8sClusterInfo(kubectlOptions)
if err != nil {
return K8sCluster{}, fmt.Errorf("could not create K8sCluster: %w", err)
return K8sCluster{}, fmt.Errorf("could not get clusterInfo struct: %w", err)
}
return K8sCluster{
clusterInfo: clusterInfo,
Expand Down

0 comments on commit f70db91

Please sign in to comment.