Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom McKay committed Apr 25, 2024
1 parent 6e89d9a commit a2183f3
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions cmd/create/oidcprovider/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import (
"net/http"
"testing"

golangmock "github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/openshift-online/ocm-common/pkg/rosa/oidcconfigs"
"github.com/openshift-online/ocm-common/pkg/utils"
"github.com/openshift/rosa/pkg/aws"
"github.com/openshift/rosa/pkg/output"
"github.com/openshift/rosa/pkg/test"
"github.com/spf13/cobra"
Expand All @@ -32,16 +34,16 @@ var _ = Describe("create oidc-provider", func() {

Context("execute create oidc-provider", func() {

var t *test.TestingRuntime
var runtime *test.TestingRuntime
var cmd *cobra.Command
var ctrl *golangmock.Controller
var ctrl *gomock.Controller

BeforeEach(func() {
t = test.NewTestRuntime()
t.InitRuntime()
runtime = test.NewTestRuntime()
runtime.InitRuntime()
output.SetOutput("")
cmd = NewCreateOidcProviderCommand()
ctrl = golangmock.NewController(GinkgoT())
ctrl = gomock.NewController(GinkgoT())
})

AfterEach(func() {
Expand Down Expand Up @@ -89,6 +91,11 @@ var _ = Describe("create oidc-provider", func() {
nil,
)

runtime.RosaRuntime.AWSClient.EXPECT().GetAWSAccessKeys().Return(&aws.AccessKey{
AccessKeyID: "abc123",
SecretAccessKey: "abc123",
}, nil).AnyTimes()

args := []string{"cluster", "auto", "https://thumbprint/url"}
cmd.ParseFlags(args)

Expand Down

0 comments on commit a2183f3

Please sign in to comment.