@@ -30,17 +30,17 @@ func TestFileInfoToCypher(t *testing.T) {
30
30
{
31
31
fileInfo { Id : "fileId" , Name : "someDir" , IsDir : true , },
32
32
"testLabel" ,
33
- "CREATE (fileId:testLabel { name: 'someDir', url: '' })" ,
33
+ "CREATE (fileId:testLabel { name: 'someDir', path: '', url: '', _tempId: 'fileId ' })" ,
34
34
},
35
35
{
36
36
fileInfo { Name : "someDir" , IsDir : true , Url : "https://github.com/someName/someRepo/tree/master/someDir" },
37
37
"testLabel" ,
38
- "CREATE (:testLabel { name: 'someDir', url: 'https://github.com/someName/someRepo/tree/master/someDir' })" ,
38
+ "CREATE (:testLabel { name: 'someDir', path: '', url: 'https://github.com/someName/someRepo/tree/master/someDir', _tempId: ' ' })" ,
39
39
},
40
40
{
41
41
fileInfo { Id : "fileId" , Name : "someFile" , IsDir : false , Size : 42 , CommitCount : 23 , ModTime : 111222333 , Extension : "go" },
42
42
"testLabel" ,
43
- "CREATE (fileId:testLabel { name: 'someFile', url: '', size: 42, commitCount: 23, lastModifiedDateTime: datetime({ epochseconds: 111222333 }), lastModifiedTimestamp: 111222333, extension: 'go' })" ,
43
+ "CREATE (fileId:testLabel { name: 'someFile', path: '', url: '', _tempId: 'fileId ', size: 42, commitCount: 23, lastModifiedDateTime: datetime({ epochseconds: 111222333 }), lastModifiedTimestamp: 111222333, extension: 'go' })" ,
44
44
},
45
45
}
46
46
for _ , table := range testTables {
@@ -101,8 +101,8 @@ func TestFolderStructureToCypher(t *testing.T) {
101
101
cypherResult string
102
102
}{
103
103
{
104
- fileInfo { Id : "someFileId " , ParentId : "someParentId " },
105
- "CREATE (someFileId )-[:IN_FOLDER]->(someParentId )" ,
104
+ fileInfo { Path : "someFilePath " , ParentPath : "someParentPath " },
105
+ "Match (a:directory { path: 'someParentPath' }) Match (b { path: 'someFilePath' }) CREATE (b )-[:IN_FOLDER]->(a )" ,
106
106
},
107
107
}
108
108
for _ , table := range testTables {
0 commit comments