@@ -59,65 +59,6 @@ class DefaultLinHistoryLogTest extends Specification {
59
59
parsedRecord. runLid == runLid
60
60
}
61
61
62
- def " should return correct record for existing session" () {
63
- given :
64
- UUID sessionId = UUID . randomUUID()
65
- String runName = " Run1"
66
- String runLid = " lid://123"
67
-
68
- and :
69
- linHistoryLog. write(runName, sessionId, runLid)
70
-
71
- when :
72
- def record = linHistoryLog. getRecord(sessionId)
73
- then :
74
- record. sessionId == sessionId
75
- record. runName == runName
76
- record. runLid == runLid
77
- }
78
-
79
- def " should return null and warn if session does not exist" () {
80
- expect :
81
- linHistoryLog. getRecord(UUID . randomUUID()) == null
82
- }
83
-
84
- def " update should modify existing Lid for given session" () {
85
- given :
86
- UUID sessionId = UUID . randomUUID()
87
- String runName = " Run1"
88
- String runLidUpdated = " run-lid-updated"
89
-
90
- and :
91
- linHistoryLog. write(runName, sessionId, ' run-lid-initial' )
92
-
93
- when :
94
- linHistoryLog. updateRunLid(sessionId, runLidUpdated)
95
-
96
- then :
97
- def files = historyFile. listFiles()
98
- files. size() == 1
99
- def parsedRecord = LinHistoryRecord . parse(files[0 ]. text)
100
- parsedRecord. runLid == runLidUpdated
101
- }
102
-
103
- def " update should do nothing if session does not exist" () {
104
- given :
105
- UUID existingSessionId = UUID . randomUUID()
106
- UUID nonExistingSessionId = UUID . randomUUID()
107
- String runName = " Run1"
108
- String runLid = " lid://123"
109
- and :
110
- linHistoryLog. write(runName, existingSessionId, runLid)
111
-
112
- when :
113
- linHistoryLog. updateRunLid(nonExistingSessionId, " new-lid" )
114
- then :
115
- def files = historyFile. listFiles()
116
- files. size() == 1
117
- def parsedRecord = LinHistoryRecord . parse(files[0 ]. text)
118
- parsedRecord. runLid == runLid
119
- }
120
-
121
62
def ' should get records' () {
122
63
given :
123
64
UUID sessionId = UUID . randomUUID()
0 commit comments