Skip to content

Commit

Permalink
baa
Browse files Browse the repository at this point in the history
  • Loading branch information
Todor Videv committed Aug 3, 2023
1 parent 4fb2ba8 commit 6c1ef2d
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 22 deletions.
10 changes: 6 additions & 4 deletions access/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import (
"context"
"errors"
"fmt"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"net/http"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/mocks"
)

func TestPolicy_GetNotificationSubscriptionOptions(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"github.com/Financial-Times/notifications-push/v5/access"
"net"
"net/http"
"net/url"
Expand All @@ -11,6 +10,8 @@ import (
"syscall"
"time"

"github.com/Financial-Times/notifications-push/v5/access"

"github.com/gorilla/mux"
cli "github.com/jawher/mow.cli"

Expand Down
10 changes: 6 additions & 4 deletions app_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@ import (
"bytes"
"context"
"fmt"
"github.com/Financial-Times/notifications-push/v5/access"
"net/http"
"net/http/httptest"
"net/url"
"regexp"
"testing"
"time"

"github.com/Financial-Times/notifications-push/v5/access"

"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/kafka-client-go/v3"
"github.com/Financial-Times/notifications-push/v5/consumer"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/mocks"
"github.com/Financial-Times/notifications-push/v5/resources"
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

var articleMsg = kafka.NewFTMessage(map[string]string{
Expand Down
7 changes: 4 additions & 3 deletions consumer/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"regexp"
"testing"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/kafka-client-go/v3"
"github.com/Financial-Times/notifications-push/v5/mocks"
hooks "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/kafka-client-go/v3"
"github.com/Financial-Times/notifications-push/v5/mocks"
)

var defaultContentURIAllowlist = regexp.MustCompile(`^http://.*-transformer-(pr|iw)-uk-.*\.svc\.ft\.com(:\d{2,5})?/(lists)/[\w-]+.*$`)
Expand Down
3 changes: 2 additions & 1 deletion consumer/mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"fmt"
"testing"

"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/assert"

"github.com/Financial-Times/notifications-push/v5/dispatch"
)

func TestMapToUpdateNotification(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dispatch/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"testing"
"time"

"github.com/Financial-Times/go-logger/v2"
hooks "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/Financial-Times/go-logger/v2"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion mocks/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"strings"
"sync"

"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/stretchr/testify/mock"

"github.com/Financial-Times/notifications-push/v5/dispatch"
)

type KeyProcessor struct {
Expand Down
3 changes: 2 additions & 1 deletion push_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"regexp"
"time"

"github.com/gorilla/mux"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/kafka-client-go/v3"
queueConsumer "github.com/Financial-Times/notifications-push/v5/consumer"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/resources"
"github.com/Financial-Times/service-status-go/httphandlers"
"github.com/gorilla/mux"
)

type notificationSystem interface {
Expand Down
5 changes: 3 additions & 2 deletions resources/healthchecks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
"net/http/httptest"
"testing"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/notifications-push/v5/mocks"
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/notifications-push/v5/mocks"
)

func TestHealthcheck(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion resources/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"net/http/httptest"
"testing"

"github.com/stretchr/testify/assert"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/stretchr/testify/assert"
)

func TestHistory(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions resources/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

logger "github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/notifications-push/v5/access"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

func TestSubscription(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion resources/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"net/http/httptest"
"testing"

"github.com/stretchr/testify/assert"

"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/notifications-push/v5/dispatch"
"github.com/Financial-Times/notifications-push/v5/mocks"
"github.com/stretchr/testify/assert"
)

func TestStats(t *testing.T) {
Expand Down

0 comments on commit 6c1ef2d

Please sign in to comment.