Skip to content

Commit 39b0ebc

Browse files
spuiukanoopcs9
authored andcommitted
integration tests: Ensure smbclient is up and running before tests
Signed-off-by: Sachin Prabhu <[email protected]>
1 parent 48e531d commit 39b0ebc

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

tests/integration/mount_path_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ func (s *MountPathSuite) waitForPods(labelPattern string) {
5151
func (s *MountPathSuite) SetupSuite() {
5252
s.tc = kube.NewTestClient("")
5353
require := s.Require()
54+
55+
// Ensure smbclient is up and running
56+
createSMBClientIfMissing(require, s.tc)
57+
5458
createFromFiles(require, s.tc, append(s.commonSources, s.smbshareSetupSources...))
5559
// ensure the smbserver test pod exists and is ready
5660
s.waitForPods(s.setupServerLabelPattern)

tests/integration/reconcile_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ func (s *scaleoutClusterSuite) SetupSuite() {
9898
// ensure the smbclient test pod exists
9999
require := s.Require()
100100
s.tc = kube.NewTestClient("")
101+
createSMBClientIfMissing(require, s.tc)
101102
createFromFiles(require, s.tc, s.fileSources)
102103
require.NoError(waitForPodExist(s), "smb server pod does not exist")
103104
require.NoError(waitForPodReady(s), "smb server pod is not ready")

tests/integration/smb_share_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ type SmbShareSuite struct {
3838
}
3939

4040
func (s *SmbShareSuite) SetupSuite() {
41-
// ensure the smbclient test pod exists
4241
if s.destNamespace == "" {
4342
s.destNamespace = testNamespace
4443
}
4544
if s.maxPods == 0 {
4645
s.maxPods = 1
4746
}
4847
s.tc = kube.NewTestClient("")
48+
// ensure the smbclient test pod exists
49+
createSMBClientIfMissing(s.Require(), s.tc)
4950
createFromFiles(s.Require(), s.tc, s.fileSources)
5051
}
5152

0 commit comments

Comments
 (0)