(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestGetLastCheckFilePath(t *testing.T) { |
| 162 | path := getLastCheckFilePath() |
| 163 | if path == "" { |
| 164 | t.Error("getLastCheckFilePath() returned empty string") |
| 165 | } |
| 166 | |
| 167 | // Check that the path contains expected components |
| 168 | if !filepath.IsAbs(path) { |
| 169 | t.Errorf("getLastCheckFilePath() returned non-absolute path: %s", path) |
| 170 | } |
| 171 | |
| 172 | // Check that the directory exists or can be created |
| 173 | dir := filepath.Dir(path) |
| 174 | if _, err := os.Stat(dir); err != nil { |
| 175 | if !os.IsNotExist(err) { |
| 176 | t.Errorf("Unexpected error checking directory: %v", err) |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func TestUpdateLastCheckTime(t *testing.T) { |
| 182 | // Save original function |
nothing calls this directly
no test coverage detected