Skip to content

Commit

Permalink
Fixed module name.
Browse files Browse the repository at this point in the history
  • Loading branch information
BartVerc committed Apr 12, 2021
1 parent df743bc commit 30a56dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package traefik_routing_plugin
package headers_by_request

// Config the plugin configuration.
type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/kumina/traefik-routing-plugin
module github.com/kumina/headers-by-request

go 1.15
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package traefik_routing_plugin
package headers_by_request

import (
"bytes"
Expand Down
14 changes: 7 additions & 7 deletions router_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package traefik_routing_plugin_test
package headers_by_request_test

import (
"context"
Expand All @@ -9,7 +9,7 @@ import (
"net/url"
"testing"

"github.com/kumina/traefik-routing-plugin"
"github.com/kumina/headers-by-request"
)

type UrlResponse struct {
Expand All @@ -20,14 +20,14 @@ func TestRouter(t *testing.T) {
ctx := context.Background()
next := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {})

body1, _ := json.Marshal(traefik_routing_plugin.HeadersRequested{
body1, _ := json.Marshal(headers_by_request.HeadersRequested{
Headers: map[string]string{
"header1": "value1",
"header2": "value2",
},
})

body2, _ := json.Marshal(traefik_routing_plugin.HeadersRequested{
body2, _ := json.Marshal(headers_by_request.HeadersRequested{
Headers: map[string]string{
"header3": "value3",
"header4": "value4",
Expand All @@ -49,12 +49,12 @@ func TestRouter(t *testing.T) {

defer ts.Close()
mockServerURL := ts.URL
traefik_routing_plugin.Client = ts.Client()
headers_by_request.Client = ts.Client()

cfg := traefik_routing_plugin.CreateConfig()
cfg := headers_by_request.CreateConfig()
cfg.UrlHeaderRequest = mockServerURL

handler, err := traefik_routing_plugin.New(ctx, next, cfg, "headers-by-request")
handler, err := headers_by_request.New(ctx, next, cfg, "headers-by-request")
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 30a56dd

Please sign in to comment.