tangled
alpha
login
or
join now
stream.place
/
streamplace
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
oauth: roll back makedb changes
Eli Mallon
9 months ago
c2627a01
34c01375
+4
-6
4 changed files
expand all
collapse all
unified
split
pkg
atproto
atproto_test.go
cmd
streamplace.go
model
model.go
segment_test.go
+1
-2
pkg/atproto/atproto_test.go
···
11
11
"github.com/bluesky-social/indigo/atproto/identity"
12
12
"github.com/bluesky-social/indigo/xrpc"
13
13
"github.com/stretchr/testify/require"
14
14
-
"stream.place/streamplace/pkg/config"
15
14
"stream.place/streamplace/pkg/log"
16
15
"stream.place/streamplace/pkg/model"
17
16
)
···
22
21
defer os.RemoveAll(dir)
23
22
24
23
fname := filepath.Join(dir, "db.sqlite")
25
25
-
mod, err := model.MakeDB(fname, &config.CLI{})
24
24
+
mod, err := model.MakeDB(fname)
26
25
require.NoError(t, err)
27
26
oldResolveIdent := ResolveIdent
28
27
ResolveIdent = func(ctx context.Context, arg string) (*identity.Identity, error) {
+1
-1
pkg/cmd/streamplace.go
···
277
277
signer = hwsigner
278
278
}
279
279
var rep replication.Replicator = &boring.BoringReplicator{Peers: cli.Peers}
280
280
-
mod, err := model.MakeDB(cli.DBPath, &cli)
280
280
+
mod, err := model.MakeDB(cli.DBPath)
281
281
if err != nil {
282
282
return err
283
283
}
+1
-1
pkg/model/model.go
···
96
96
DeletePAR(id string) error
97
97
}
98
98
99
99
-
func MakeDB(dbURL string, cli *config.CLI) (Model, error) {
99
99
+
func MakeDB(dbURL string) (Model, error) {
100
100
log.Log(context.Background(), "starting database", "dbURL", dbURL)
101
101
sqliteSuffix := dbURL
102
102
if dbURL != ":memory:" {
+1
-2
pkg/model/segment_test.go
···
7
7
"time"
8
8
9
9
"github.com/stretchr/testify/require"
10
10
-
"stream.place/streamplace/pkg/config"
11
10
)
12
11
13
12
func TestSegmentCleaner(t *testing.T) {
14
14
-
db, err := MakeDB(":memory:", &config.CLI{})
13
13
+
db, err := MakeDB(":memory:")
15
14
require.NoError(t, err)
16
15
// Create a model instance
17
16
model := db.(*DBModel)