Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6
- name: typos-action
uses: crate-ci/typos@v1.43.5
uses: crate-ci/typos@v1.44.0
4 changes: 2 additions & 2 deletions pkg/gofr/datasource/pubsub/mqtt/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type mockMessage struct {
retained bool
topic string
messageID int
pyload string
payload string
}

func (m mockMessage) Duplicate() bool {
Expand Down Expand Up @@ -44,7 +44,7 @@ func (m mockMessage) MessageID() uint16 {
}

func (m mockMessage) Payload() []byte {
return []byte(m.pyload)
return []byte(m.payload)
}

func (mockMessage) Ack() {
Expand Down
8 changes: 4 additions & 4 deletions pkg/gofr/datasource/pubsub/mqtt/mqtt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func Test_getHandler(t *testing.T) {
retained: false,
topic: "test/topic",
messageID: 123,
pyload: "hello from sub func",
payload: "hello from sub func",
})
}

Expand Down Expand Up @@ -627,8 +627,8 @@ func TestMQTT_createQueryMessageHandler(t *testing.T) {

handler := mq.createQueryMessageHandler(t.Context(), msgChan, topic)

mockMsg1 := &mockMessage{topic: topic, pyload: "message 1", messageID: 123, qos: 1, retained: false}
mockMsg2 := &mockMessage{topic: topic, pyload: "message 2 (dropped)", messageID: 124, qos: 1, retained: false}
mockMsg1 := &mockMessage{topic: topic, payload: "message 1", messageID: 123, qos: 1, retained: false}
mockMsg2 := &mockMessage{topic: topic, payload: "message 2 (dropped)", messageID: 124, qos: 1, retained: false}

// Send first message
handler(nil, mockMsg1)
Expand Down Expand Up @@ -773,7 +773,7 @@ func TestMQTT_Query_SuccessCases(t *testing.T) {
time.Sleep(10 * time.Millisecond)

for _, msg := range tc.messages {
capturedHandler(nil, &mockMessage{topic: topic, pyload: msg, qos: int(mockConfigs.QoS)})
capturedHandler(nil, &mockMessage{topic: topic, payload: msg, qos: int(mockConfigs.QoS)})
}
}()

Expand Down
Loading