1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 14:07:02 +09:00
This commit is contained in:
Sergey Cherepanov 2023-01-07 13:35:12 +03:00 committed by Mikhail Iudin
parent 3c611239b9
commit da4a43d5a0
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
5 changed files with 7 additions and 5 deletions

View file

@ -14,7 +14,7 @@ jobs:
- name: Vet - name: Vet
run: | run: |
go vet ./... make vet
- name: Unit tests - name: Unit tests
run: | run: |
sudo make test-coverage sudo make test-coverage

View file

@ -1,4 +1,4 @@
.PHONY: proto test test-coverage .PHONY: proto test test-coverage vet
export GOPRIVATE=github.com/anytypeio export GOPRIVATE=github.com/anytypeio
proto: proto:
@ -16,6 +16,9 @@ proto:
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto
vet:
go vet ./...
test: test:
go test ./... --cover go test ./... --cover

View file

@ -395,7 +395,6 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang
} }
return return
} }
return
} }
func (ot *objectTree) createAddResult(oldHeads []string, mode Mode, treeChangesAdded []*Change, rawChanges []*treechangeproto.RawTreeChangeWithId) (addResult AddResult, err error) { func (ot *objectTree) createAddResult(oldHeads []string, mode Mode, treeChangesAdded []*Change, rawChanges []*treechangeproto.RawTreeChangeWithId) (addResult AddResult, err error) {

View file

@ -133,7 +133,7 @@ func (st *deletionState) CreateDeleteChange(id string, isSnapshot bool) (res []b
} }
change := &spacesyncproto.SettingsData{ change := &spacesyncproto.SettingsData{
Content: []*spacesyncproto.SpaceSettingsContent{ Content: []*spacesyncproto.SpaceSettingsContent{
{content}, {Value: content},
}, },
Snapshot: nil, Snapshot: nil,
} }

View file

@ -55,7 +55,7 @@ func TestProvider_ProcessChange(t *testing.T) {
ch := &objecttree.Change{} ch := &objecttree.Change{}
ch.Model = &spacesyncproto.SettingsData{ ch.Model = &spacesyncproto.SettingsData{
Content: []*spacesyncproto.SpaceSettingsContent{ Content: []*spacesyncproto.SpaceSettingsContent{
{&spacesyncproto.SpaceSettingsContent_ObjectDelete{ {Value: &spacesyncproto.SpaceSettingsContent_ObjectDelete{
ObjectDelete: &spacesyncproto.ObjectDelete{Id: "id1"}, ObjectDelete: &spacesyncproto.ObjectDelete{Id: "id1"},
}}, }},
}, },