MCPcopy Create free account
hub / github.com/beeker1121/goque / TestStackDrop

Function TestStackDrop

stack_test.go:37–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestStackDrop(t *testing.T) {
38 file := fmt.Sprintf("test_db_%d", time.Now().UnixNano())
39 s, err := OpenStack(file)
40 if err != nil {
41 t.Error(err)
42 }
43
44 if _, err = os.Stat(file); os.IsNotExist(err) {
45 t.Error(err)
46 }
47
48 s.Drop()
49
50 if _, err = os.Stat(file); err == nil {
51 t.Error("Expected directory for test database to have been deleted")
52 }
53}
54
55func TestStackIncompatibleType(t *testing.T) {
56 file := fmt.Sprintf("test_db_%d", time.Now().UnixNano())

Callers

nothing calls this directly

Calls 2

OpenStackFunction · 0.85
DropMethod · 0.45

Tested by

no test coverage detected