Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan <[email protected]>
  • Loading branch information
JonahFarc committed Mar 7, 2024
1 parent bd6ea26 commit a3bfb29
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions contextbasedrestrictionsv1/context_based_restrictions_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,13 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() {
Context(`Using external config, construct service client instances`, func() {
// Map containing environment variables used in testing.
var testEnvironment = map[string]string{
"CONTEXT_BASED_RESTRICTIONS_URL": "https://contextbasedrestrictionsv1/api",
"CONTEXT_BASED_RESTRICTIONS_URL": "https://contextbasedrestrictionsv1/api",
"CONTEXT_BASED_RESTRICTIONS_AUTH_TYPE": "noauth",
}

It(`Create service client using external config successfully`, func() {
SetTestEnvironment(testEnvironment)
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{
})
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{})
Expect(contextBasedRestrictionsService).ToNot(BeNil())
Expect(serviceErr).To(BeNil())
ClearTestEnvironment(testEnvironment)
Expand Down Expand Up @@ -103,8 +102,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() {
})
It(`Create service client using external config and set url programatically successfully`, func() {
SetTestEnvironment(testEnvironment)
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{
})
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{})
err := contextBasedRestrictionsService.SetServiceURL("https://testService/api")
Expect(err).To(BeNil())
Expect(contextBasedRestrictionsService).ToNot(BeNil())
Expand All @@ -122,13 +120,12 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() {
Context(`Using external config, construct service client instances with error: Invalid Auth`, func() {
// Map containing environment variables used in testing.
var testEnvironment = map[string]string{
"CONTEXT_BASED_RESTRICTIONS_URL": "https://contextbasedrestrictionsv1/api",
"CONTEXT_BASED_RESTRICTIONS_URL": "https://contextbasedrestrictionsv1/api",
"CONTEXT_BASED_RESTRICTIONS_AUTH_TYPE": "someOtherAuth",
}

SetTestEnvironment(testEnvironment)
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{
})
contextBasedRestrictionsService, serviceErr := contextbasedrestrictionsv1.NewContextBasedRestrictionsV1UsingExternalConfig(&contextbasedrestrictionsv1.ContextBasedRestrictionsV1Options{})

It(`Instantiate service client with error`, func() {
Expect(contextBasedRestrictionsService).To(BeNil())
Expand All @@ -139,7 +136,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() {
Context(`Using external config, construct service client instances with error: Invalid URL`, func() {
// Map containing environment variables used in testing.
var testEnvironment = map[string]string{
"CONTEXT_BASED_RESTRICTIONS_AUTH_TYPE": "NOAuth",
"CONTEXT_BASED_RESTRICTIONS_AUTH_TYPE": "NOAuth",
}

SetTestEnvironment(testEnvironment)
Expand Down

0 comments on commit a3bfb29

Please sign in to comment.