MCPcopy Create free account
hub / github.com/github/gh-aw / TestGetLastCheckFilePath

Function TestGetLastCheckFilePath

pkg/cli/update_check_test.go:161–179  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

159}
160
161func 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
181func TestUpdateLastCheckTime(t *testing.T) {
182 // Save original function

Callers

nothing calls this directly

Calls 3

getLastCheckFilePathFunction · 0.85
ErrorMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected