Align persistence ginkgo tests to conventions

This commit is contained in:
Nick Meves
2020-07-21 22:13:17 -07:00
parent 88ef888752
commit 19836f85ac
6 changed files with 50 additions and 20 deletions
+1 -10
View File
@@ -1,24 +1,15 @@
package persistence
import (
"testing"
"time"
"github.com/oauth2-proxy/oauth2-proxy/pkg/apis/options"
sessionsapi "github.com/oauth2-proxy/oauth2-proxy/pkg/apis/sessions"
"github.com/oauth2-proxy/oauth2-proxy/pkg/logger"
"github.com/oauth2-proxy/oauth2-proxy/pkg/sessions/tests"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestManager(t *testing.T) {
logger.SetOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Persistence Manager SessionStore")
}
var _ = Describe("Persistence Manager SessionStore Tests", func() {
var _ = Describe("Persistence Manager Tests", func() {
var ms *tests.MockStore
BeforeEach(func() {
ms = tests.NewMockStore()
@@ -0,0 +1,15 @@
package persistence
import (
"testing"
"github.com/oauth2-proxy/oauth2-proxy/pkg/logger"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestPersistenceSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Persistence")
}
-7
View File
@@ -13,18 +13,11 @@ import (
"github.com/oauth2-proxy/oauth2-proxy/pkg/apis/options"
"github.com/oauth2-proxy/oauth2-proxy/pkg/apis/sessions"
"github.com/oauth2-proxy/oauth2-proxy/pkg/logger"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
)
func Test_ticket(t *testing.T) {
logger.SetOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Session Ticket")
}
var _ = Describe("Session Ticket Tests", func() {
Context("encodeTicket & decodeTicket", func() {
type ticketTableInput struct {