Skip to content

Commit e724900

Browse files
committed
test(sdk): add tests for file and folder socket events
1 parent 64acc24 commit e724900

File tree

2 files changed

+333
-73
lines changed

2 files changed

+333
-73
lines changed

filen-sdk-rs/src/socket/shared.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -423,27 +423,27 @@ pub(super) use listener_manager::{
423423
#[derive(Debug, Clone, PartialEq, Eq, CowHelpers, Yokeable)]
424424
pub enum DecryptedSocketEvent<'a> {
425425
/// Sent after successful authentication, including on reconnect
426-
AuthSuccess,
426+
AuthSuccess, // tested
427427
/// Sent after failed authentication, including on reconnect, after which the socket is closed and all listeners removed
428-
AuthFailed,
428+
AuthFailed, // tested
429429
/// Sent when the socket has unexpectedly closed and begins attempting to reconnect
430430
Reconnecting,
431431
/// Sent when the handle to the event listener has been dropped and the listener is removed
432-
Unsubscribed,
432+
Unsubscribed, // tested
433433
NewEvent(NewEvent<'a>),
434-
FileRename(FileRename<'a>),
435-
FileArchiveRestored(FileArchiveRestored),
436-
FileNew(FileNew),
437-
FileRestore(FileRestore),
438-
FileMove(FileMove),
439-
FileTrash(FileTrash),
440-
FileArchived(FileArchived),
441-
FolderRename(FolderRename<'a>),
442-
FolderTrash(FolderTrash),
443-
FolderMove(FolderMove),
444-
FolderSubCreated(FolderSubCreated),
445-
FolderRestore(FolderRestore),
446-
FolderColorChanged(FolderColorChanged<'a>),
434+
FileRename(FileRename<'a>), // rust never uses this, so no way to test it
435+
FileArchiveRestored(FileArchiveRestored), // not sure what this is for
436+
FileNew(FileNew), // tested, needs size added
437+
FileRestore(FileRestore), // tested, needs size added
438+
FileMove(FileMove), // tested, needs size added
439+
FileTrash(FileTrash), // tested, might want to add enough info to build a RemoteFile here
440+
FileArchived(FileArchived), // untested, not sure what this is for
441+
FolderRename(FolderRename<'a>), // rust never uses this, so no way to test it
442+
FolderTrash(FolderTrash), // tested, might want to add enough info to build a RemoteFolder here
443+
FolderMove(FolderMove), // tested, needs color added
444+
FolderSubCreated(FolderSubCreated), // tested, needs color added
445+
FolderRestore(FolderRestore), // tested, needs color added
446+
FolderColorChanged(FolderColorChanged<'a>), // tested
447447
TrashEmpty,
448448
PasswordChanged,
449449
ChatMessageNew(ChatMessageNew),
@@ -467,10 +467,10 @@ pub enum DecryptedSocketEvent<'a> {
467467
ContactRequestReceived(ContactRequestReceived<'a>),
468468
ItemFavorite(ItemFavorite),
469469
ChatConversationParticipantNew(ChatConversationParticipantNew<'a>),
470-
FileDeletedPermanent(FileDeletedPermanent),
471-
FolderMetadataChanged(FolderMetadataChanged<'a>),
472-
FolderDeletedPermanent(FolderDeletedPermanent),
473-
FileMetadataChanged(FileMetadataChanged<'a>),
470+
FileDeletedPermanent(FileDeletedPermanent), // tested
471+
FolderMetadataChanged(FolderMetadataChanged<'a>), // tested
472+
FolderDeletedPermanent(FolderDeletedPermanent), // tested
473+
FileMetadataChanged(FileMetadataChanged<'a>), // tested
474474
}
475475

476476
impl DecryptedSocketEvent<'_> {

0 commit comments

Comments
 (0)