Skip to content

Commit

Permalink
disabling lint and codecov for the dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
gabo1208 committed May 13, 2022
1 parent e3528a4 commit 2b4c574
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ignore:
- "**/zz_generated*.go" # Ignore generated files.
- "pkg/client"
- "pkg/dispatcher" #temporary until wabbit is gone
- "third_party"
- "vendor"
- "test"
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ run:
skip-dirs:
- pkg/client
- pkg/internal/thirdparty
- pkg/dispatcher

linters:
enable:
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapter/adapter_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 The Knative Authors
Copyright 2022 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
22 changes: 14 additions & 8 deletions pkg/dispatcher/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,30 @@ import (
"bytes"
"context"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"sync"
"testing"
"time"

"github.com/NeowayLabs/wabbit"
"github.com/NeowayLabs/wabbit/amqptest/server"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
)

const (
rabbitURL = "amqp://localhost:5672/%2f"
queueName = "queue"
exchangeName = "default/knative-testbroker"
/*eventData = `{"testdata":"testdata"}`
rabbitURL = "amqp://localhost:5672/%2f"
queueName = "queue"
exchangeName = "default/knative-testbroker"
eventData = `{"testdata":"testdata"}`
eventData2 = `{"testdata":"testdata2"}`
responseData = `{"testresponse":"testresponsedata"}`
expectedData = `"{\"testdata\":\"testdata\"}"`
expectedData2 = `"{\"testdata\":\"testdata2\"}"`
expectedResponseData = `"{\"testresponse\":\"testresponsedata\"}"`*/
expectedResponseData = `"{\"testresponse\":\"testresponsedata\"}"`
)

func TestFailToConsume(t *testing.T) {
Expand Down Expand Up @@ -105,7 +112,7 @@ func createRabbitAndQueue() (wabbit.Channel, *server.AMQPServer, error) {
return ch, fakeServer, nil
}

/* func TestEndToEnd(t *testing.T) {
func TestEndToEnd(t *testing.T) {
t.Skip()
testCases := map[string]struct {
// Subscriber config, how many events to expect, how to respond, etc.
Expand Down Expand Up @@ -381,7 +388,6 @@ type fakeHandler struct {
responseEvents []ce.Event
}

func (h *fakeHandler) getBodies() []string {
h.mu.Lock()
defer h.mu.Unlock()
Expand Down Expand Up @@ -462,4 +468,4 @@ func createEvent(data string) ce.Event {

func stringSort(x, y string) bool {
return x < y
} */
}

0 comments on commit 2b4c574

Please sign in to comment.