Skip to content

Commit

Permalink
Refactored test properties & SignUpTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakim-Kay committed Jun 13, 2024
1 parent b7985e8 commit 9e57430
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/main/resources/application-test.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
spring.datasource.url=jdbc:postgresql://localhost:5432/acebook_springboot_test
spring.datasource.username=op://Shared/DATABASE_USERNAME
spring.datasource.password=op://Shared/DATABASE_PASSWORD
spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_DELAY=-1
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=DATABASE_USERNAME
spring.datasource.password=DATABASE_PASSWORD
flyway.baseline-on-migrate=true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect

# 1Password CLI Authentication Details
op.email=op://Shared/OP_EMAIL
op.secret-key=op://Shared/OP_SECRET_KEY
spring.flyway.enabled=false
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
3 changes: 2 additions & 1 deletion src/test/java/SignUpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class)
@ActiveProfiles("test")
public class SignUpTest {

public WebDriver driver;
Expand Down

0 comments on commit 9e57430

Please sign in to comment.