@@ -5929,7 +5929,7 @@ func TestPublishLun(t *testing.T) {
59295929 mockAPI .EXPECT ().LunMapGetReportingNodes (ctx , igroupName , lunPath ).Return ([]string {"Node1" }, nil )
59305930 mockAPI .EXPECT ().GetSLMDataLifs (ctx , ips , []string {"Node1" }).Return ([]string {}, nil )
59315931
5932- err := PublishLUN (ctx , mockAPI , config , ips , publishInfo , lunPath , igroupName , iSCSINodeName , volNoFsOrFmt )
5932+ err := PublishLUN (ctx , mockAPI , config , ips , publishInfo , lunPath , igroupName , iSCSINodeName , publishVolCfg ( "xfs" , "" ) )
59335933
59345934 assert .NoError (t , err )
59355935
@@ -5942,7 +5942,7 @@ func TestPublishLun(t *testing.T) {
59425942
59435943 assert .Error (t , err )
59445944
5945- // Test 3 - LunGetFSType returns error
5945+ // Test 3 - LunGetFSType returns error, fstype will fall back to fstype in vol config
59465946 mockAPI = mockapi .NewMockOntapAPI (mockCtrl )
59475947 publishInfo .HostIQN = []string {"host_iqn" }
59485948 mockAPI .EXPECT ().LunGetFSType (ctx , lunPath ).Return ("" , errors .New ("LunGetFSType returned error" ))
@@ -5956,7 +5956,7 @@ func TestPublishLun(t *testing.T) {
59565956 err = PublishLUN (ctx , mockAPI , config , ips , publishInfo , lunPath , igroupName , iSCSINodeName , volNoFsOrFmt )
59575957
59585958 assert .NoError (t , err )
5959- assert .Equal (t , drivers . DefaultFileSystemType , publishInfo .FilesystemType )
5959+ assert .Equal (t , "" , publishInfo .FilesystemType )
59605960
59615961 // Test 4 - LunGetAttribute returns error (fstype still from LUN)
59625962 mockAPI = mockapi .NewMockOntapAPI (mockCtrl )
@@ -6106,7 +6106,7 @@ func TestPublishLun(t *testing.T) {
61066106 assert .Equal (t , volFmtOpts , publishInfo .FormatOptions )
61076107 assert .Contains (t , publishInfo .MountOptions , "nouuid" )
61086108
6109- // Test 12 - volume fstype empty, LunGetFSType returns empty string with no error, use default
6109+ // Test 12 - volume fstype empty, LunGetFSType returns empty string with no error, expect empty
61106110 mockAPI = mockapi .NewMockOntapAPI (mockCtrl )
61116111 publishInfo = & tridentmodels.VolumePublishInfo {
61126112 BackendUUID : "fakeBackendUUID" ,
@@ -6127,9 +6127,9 @@ func TestPublishLun(t *testing.T) {
61276127 err = PublishLUN (ctx , mockAPI , config , ips , publishInfo , lunPath , igroupName , iSCSINodeName , volNoFsOrFmt )
61286128
61296129 assert .NoError (t , err )
6130- assert .Equal (t , drivers . DefaultFileSystemType , publishInfo .FilesystemType )
6130+ assert .Equal (t , "" , publishInfo .FilesystemType )
61316131
6132- // Test 13 - volume fstype empty, LunGetFSType returns error, use default
6132+ // Test 13 - volume fstype empty, LunGetFSType returns error, will be empty
61336133 mockAPI = mockapi .NewMockOntapAPI (mockCtrl )
61346134 publishInfo = & tridentmodels.VolumePublishInfo {
61356135 BackendUUID : "fakeBackendUUID" ,
@@ -6150,7 +6150,7 @@ func TestPublishLun(t *testing.T) {
61506150 err = PublishLUN (ctx , mockAPI , config , ips , publishInfo , lunPath , igroupName , iSCSINodeName , volNoFsOrFmt )
61516151
61526152 assert .NoError (t , err )
6153- assert .Equal (t , drivers . DefaultFileSystemType , publishInfo .FilesystemType )
6153+ assert .Equal (t , "" , publishInfo .FilesystemType )
61546154
61556155 // Test 14 - volConfig "raw", LUN attribute returns "ext4": LUN attribute wins.
61566156 // Surfaces the real on-disk fstype so the node-side mismatch guard can fire.
0 commit comments