mirror of
				https://github.com/nkanaev/yarr.git
				synced 2025-10-29 22:29:59 +00:00 
			
		
		
		
	bump
This commit is contained in:
		| @@ -4,15 +4,22 @@ import ( | |||||||
| 	"io" | 	"io" | ||||||
| 	"log" | 	"log" | ||||||
| 	"os" | 	"os" | ||||||
|  | 	"testing" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func testDB() *Storage { | func testDB() *Storage { | ||||||
| 	log.SetOutput(io.Discard) | 	log.SetOutput(io.Discard) | ||||||
| 	db, err := New(":memory:") | 	db, _ := New(":memory:") | ||||||
| 	if err != nil { |  | ||||||
| 		os.Stderr.WriteString(err.Error()) |  | ||||||
| 		os.Exit(1) |  | ||||||
| 	} |  | ||||||
| 	log.SetOutput(os.Stderr) | 	log.SetOutput(os.Stderr) | ||||||
| 	return db | 	return db | ||||||
| } | } | ||||||
|  |  | ||||||
|  | func TestStorage(t *testing.T) { | ||||||
|  | 	db, err := New(":memory:") | ||||||
|  | 	if err != nil { | ||||||
|  | 		t.Fatal(err) | ||||||
|  | 	} | ||||||
|  | 	if db == nil { | ||||||
|  | 		t.Fatal("no db") | ||||||
|  | 	} | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user