Skip to content

Commit

Permalink
Merge pull request #7 from wiemanboy/feature/cleanup
Browse files Browse the repository at this point in the history
Cleanup test env variables and configuration
  • Loading branch information
wiemanboy authored Oct 18, 2024
2 parents e602eb8 + fb3f51e commit 360a2b9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ jobs:
run: mvn test
env:
FUNCTIONAL_TESTING: false
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
"okta.oauth2.issuer": https://${{ secrets.OKTA_OAUTH2_ISSUER }}/
"okta.oauth2.audience": ${{ secrets.OKTA_OAUTH2_AUDIENCE }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.wiemanboy</groupId>
<artifactId>WiemanApi</artifactId>
<version>0.1.0</version>
<version>0.1.1</version>
<name>WiemanApi</name>
<description>WiemanApi</description>
<url/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
Expand All @@ -11,7 +10,7 @@
import org.springframework.security.oauth2.jwt.*;
import org.springframework.security.web.SecurityFilterChain;

@Configuration

@EnableWebSecurity
public class SecurityConfig {

Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
okta.oauth2.issuer=https://${AUTH0_DOMAIN}/
okta.oauth2.client-id=${AUTH0_CLIENT_ID}
okta.oauth2.client-secret=${AUTH0_CLIENT_SECRET}
okta.oauth2.audience=${AUTH0_AUDIENCE}
6 changes: 1 addition & 5 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ spring.data.mongodb.database=${MONGO_DB:dev_db}
spring.data.mongodb.username=${MONGO_USER:admin}
spring.data.mongodb.password=${MONGO_PASS:admin}
spring.data.mongodb.authentication-database=${MONGO_AUTH_DB:admin}
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
okta.oauth2.issuer=https://${AUTH0_BASE_URL}/
okta.oauth2.client-id=${AUTH0_CLIENT_ID}
okta.oauth2.client-secret=${AUTH0_CLIENT_SECRET}
okta.oauth2.audience=${AUTH0_AUDIENCE}
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.wiemanboy.wiemanapi;

import com.wiemanboy.wiemanapi.config.TestSecurityConfig;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@Disabled
@SpringBootTest(classes = {TestSecurityConfig.class, WiemanApiApplication.class})
class WiemanApiApplicationTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.wiemanboy.wiemanapi.config.TestSecurityConfig;
import com.wiemanboy.wiemanapi.data.ProfileRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -19,7 +18,6 @@
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@Disabled
@SpringBootTest(classes = {TestSecurityConfig.class, WiemanApiApplication.class})
@AutoConfigureMockMvc
public class ProfileControllerTest {
Expand Down

0 comments on commit 360a2b9

Please sign in to comment.