Slightly improve sqlite db engine tests
This commit is contained in:
parent
9407ec23c2
commit
054354b384
@ -145,13 +145,14 @@ func TestNetwork_SetConfig(t *testing.T) {
|
||||
h = newIntegrationHarness(t)
|
||||
network = h.createNetwork(t, "primus", nil)
|
||||
networkConfig = network.getConfig(t)
|
||||
metaPath = h.mkDir(t, "meta").Path
|
||||
)
|
||||
|
||||
networkConfig.Storage.Allocations = append(
|
||||
networkConfig.Storage.Allocations,
|
||||
daecommon.ConfigStorageAllocation{
|
||||
DataPath: h.mkDir(t, "data").Path,
|
||||
MetaPath: h.mkDir(t, "meta").Path,
|
||||
MetaPath: metaPath,
|
||||
Capacity: 1,
|
||||
S3APIPort: 4900,
|
||||
RPCPort: 4901,
|
||||
@ -199,6 +200,7 @@ func TestNetwork_SetConfig(t *testing.T) {
|
||||
string(garageConfig),
|
||||
`db_engine = "`+garagesrv.DBEngineSqlite+`"`,
|
||||
)
|
||||
assert.FileExists(t, filepath.Join(metaPath, "db.sqlite"))
|
||||
})
|
||||
|
||||
t.Run("add storage alloc/lmdb", func(t *testing.T) {
|
||||
@ -238,6 +240,7 @@ func TestNetwork_SetConfig(t *testing.T) {
|
||||
string(garageConfig),
|
||||
`db_engine = "`+garagesrv.DBEngineLMDB+`"`,
|
||||
)
|
||||
assert.NoFileExists(t, filepath.Join(metaPath, "db.sqlite"))
|
||||
})
|
||||
|
||||
t.Run("remove storage alloc", func(t *testing.T) {
|
||||
|
13
tasks/nats/add.md
Normal file
13
tasks/nats/add.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
type: tasks
|
||||
---
|
||||
|
||||
Introduce [NATS][nats] as a new service run by Isle. All hosts should join the
|
||||
NATS network.
|
||||
|
||||
* The nebula lighthouse hosts can be used as the bootstrap nodes for finding the
|
||||
rest of the NATS peers.
|
||||
|
||||
* The firewall must have a port automatically opened on it for all hosts.
|
||||
|
||||
[nats]: https://nats.io/
|
28
tasks/nats/garage-watcher.md
Normal file
28
tasks/nats/garage-watcher.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
type: tasks
|
||||
after:
|
||||
- ./add.md
|
||||
---
|
||||
|
||||
A simple mechanism should be developed which "watches" a garage directory or
|
||||
file for changes. This mechanism has too sides.
|
||||
|
||||
## Producer
|
||||
|
||||
When making a change to a file in garage (putting or deleting) the producer
|
||||
should publish the path to that file to a bucket-specific pubsub channel on
|
||||
NATS.
|
||||
|
||||
This only applies for file changes which are expected to have a watcher.
|
||||
|
||||
## Watcher
|
||||
|
||||
The watcher is a simple mechanism which looks like this:
|
||||
|
||||
```go
|
||||
type Watcher interface {
|
||||
Wait(context.Context) (string, error) // returns the path to the changed file
|
||||
}
|
||||
```
|
||||
|
||||
It can be initialized with either a specific file path or a doublestar matcher.
|
Loading…
Reference in New Issue
Block a user