]> git.r.bdr.sh - rbdr/mobius/commitdiff
Fix test
authorJeff Halter <redacted>
Mon, 29 Apr 2024 20:17:28 +0000 (13:17 -0700)
committerJeff Halter <redacted>
Mon, 29 Apr 2024 23:33:35 +0000 (16:33 -0700)
hotline/transaction_handlers_test.go

index 89ee9fce9b39d04303e0d1fb0c4b9af66b55aed5..b03e3b18b77185dc3b080b660768b74182ede5fa 100644 (file)
@@ -768,7 +768,6 @@ func TestHandleGetFileInfo(t *testing.T) {
                                                NewField(FieldFileName, []byte("testfile.txt")),
                                                NewField(FieldFileTypeString, []byte("Text File")),
                                                NewField(FieldFileCreatorString, []byte("ttxt")),
                                                NewField(FieldFileName, []byte("testfile.txt")),
                                                NewField(FieldFileTypeString, []byte("Text File")),
                                                NewField(FieldFileCreatorString, []byte("ttxt")),
-                                               NewField(FieldFileComment, []byte{}),
                                                NewField(FieldFileType, []byte("TEXT")),
                                                NewField(FieldFileCreateDate, make([]byte, 8)),
                                                NewField(FieldFileModifyDate, make([]byte, 8)),
                                                NewField(FieldFileType, []byte("TEXT")),
                                                NewField(FieldFileCreateDate, make([]byte, 8)),
                                                NewField(FieldFileModifyDate, make([]byte, 8)),
@@ -791,8 +790,8 @@ func TestHandleGetFileInfo(t *testing.T) {
 
                        // Clear the fileWrapper timestamp fields to work around problems running the tests in multiple timezones
                        // TODO: revisit how to test this by mocking the stat calls
 
                        // Clear the fileWrapper timestamp fields to work around problems running the tests in multiple timezones
                        // TODO: revisit how to test this by mocking the stat calls
+                       gotRes[0].Fields[4].Data = make([]byte, 8)
                        gotRes[0].Fields[5].Data = make([]byte, 8)
                        gotRes[0].Fields[5].Data = make([]byte, 8)
-                       gotRes[0].Fields[6].Data = make([]byte, 8)
                        if !assert.Equal(t, tt.wantRes, gotRes) {
                                t.Errorf("HandleGetFileInfo() gotRes = %v, want %v", gotRes, tt.wantRes)
                        }
                        if !assert.Equal(t, tt.wantRes, gotRes) {
                                t.Errorf("HandleGetFileInfo() gotRes = %v, want %v", gotRes, tt.wantRes)
                        }