Skip to content

Commit

Permalink
chore update to latest moleculer and fix issue with ginkgo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pentateu committed Apr 18, 2022
1 parent 5c814cf commit e2b1d61
Show file tree
Hide file tree
Showing 36 changed files with 255 additions and 86 deletions.
1 change: 1 addition & 0 deletions .snapshots/store-glob--func8-3-Find()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 all:* lastname:Snow name:John] map[age:65 all:* lastname:Travolta name:John]])
1 change: 1 addition & 0 deletions .snapshots/store-glob--func8-4-FindById()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 all:* lastname:Snow name:John])
1 change: 1 addition & 0 deletions .snapshots/store-glob--func8-5-FindByIds()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 all:* lastname:Snow name:John] map[age:65 all:* lastname:Travolta name:John]])
1 change: 1 addition & 0 deletions .snapshots/store-glob--func8-6-Count()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(2)
1 change: 1 addition & 0 deletions .snapshots/store-glob--func8-8-Insert()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[all:* lastname:Cesar name:Julio]])
17 changes: 8 additions & 9 deletions adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ import (
. "github.com/onsi/gomega"
)

func contextAndDelegated(nodeID string, config moleculer.Config) (moleculer.BrokerContext, *moleculer.BrokerDelegates) {
dl := test.DelegatesWithIdAndConfig(nodeID, config)
ctx := context.BrokerContext(dl)
return ctx, dl
}

type M map[string]interface{}

var _ = Describe("Moleculer DB Mixin", func() {

Describe("list action", func() {
Expand Down Expand Up @@ -201,7 +193,6 @@ var _ = Describe("Moleculer DB Mixin", func() {
params := payload.New(M{"": ""})
settingsPopulates := M{"master": "users.get"}
mcalls := createPopulateMCalls(result, params, settingsPopulates, []string{"master"})

r := payload.New(mcalls)
Expect(r.Get(userID + "_master_users.get").Exists()).Should(BeTrue())
Expect(r.Get(userID + "_master_users.get").Get("action").Exists()).Should(BeTrue())
Expand Down Expand Up @@ -624,3 +615,11 @@ var _ = Describe("Moleculer DB Mixin", func() {
})

})

func contextAndDelegated(nodeID string, config moleculer.Config) (moleculer.BrokerContext, *moleculer.BrokerDelegates) {
dl := test.DelegatesWithIdAndConfig(nodeID, config)
ctx := context.BrokerContext(dl)
return ctx, dl
}

type M map[string]interface{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[deletedCount:1])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[deletedCount:1])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 lastname:Snow name:John] map[age:75 lastname:Claire name:Marie] map[age:65 lastname:Travolta name:John] map[age:46 lastname:Assange name:Julian] map[age:13 lastname:Pan name:Peter] map[age:13 lastname:Man name:Stone]])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 lastname:Snow name:John] map[age:75 lastname:Claire name:Marie] map[age:65 lastname:Travolta name:John] map[age:46 lastname:Assange name:Julian] map[age:13 lastname:Pan name:Peter] map[age:13 lastname:Man name:Stone]])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[page:1 pageSize:10 total:6 totalPages:1])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 lastname:Snow name:John] map[age:75 lastname:Claire name:Marie] map[age:65 lastname:Travolta name:John] map[age:46 lastname:Assange name:Julian] map[age:13 lastname:Pan name:Peter] map[age:13 lastname:Man name:Stone]])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[page:1 pageSize:10 total:6 totalPages:1])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 lastname:Snow name:John] map[age:75 lastname:Claire name:Marie] map[age:65 lastname:Travolta name:John] map[age:46 lastname:Assange name:Julian] map[age:13 lastname:Pan name:Peter] map[age:13 lastname:Man name:Stone]])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[lastname:DoCaixao name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[lastname:DoCaixao name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:0 lastname:DoCaixao name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[lastname:DoCaixao name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:DasCouves name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[matchedCount:1 modifiedCount:1])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:DasCouves name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:DasCouves name:Ze])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:Snow name:ZeDaSilva])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:Snow name:John])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)(map[age:25 lastname:Snow name:ZeDaSilva])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(*payload.RawPayload)([map[age:25 lastname:Snow name:ZeDaSilva]])
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package store_test

import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)

func TestMoleculerDb(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion elastic/elastic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)

var _ = Describe("Elastic", func() {
var _ = XDescribe("Elastic", func() {

log.SetLevel(log.InfoLevel)
log.SetFormatter(&log.TextFormatter{
Expand Down
14 changes: 5 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ go 1.12
require (
crawshaw.io/sqlite v0.2.0
github.com/elastic/go-elasticsearch/v7 v7.6.0
github.com/elastic/go-elasticsearch/v8 v8.0.0-20200227092316-472eb1288b72
github.com/golang/snappy v0.0.1 // indirect
github.com/hashicorp/go-memdb v1.0.1
github.com/moleculer-go/cupaloy/v2 v2.5.2
github.com/moleculer-go/moleculer v0.2.5
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/sirupsen/logrus v1.4.1
github.com/moleculer-go/moleculer v0.3.2
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.3
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.0.1
go.mongodb.org/mongo-driver v1.5.2
)
Loading

0 comments on commit e2b1d61

Please sign in to comment.