Skip to content

Commit

Permalink
Re-enable tests that use embedded Postgres (#197)
Browse files Browse the repository at this point in the history
Since we originally implemented these and had problems running the
tests on macOS, things seem to have gotten fixed. So this commit simply
removes the EnabledOnOs annotation that restricted to Linux. I don't
really care about Windows, and doubt anyone is using this there anyway.

See:

zonkyio/embedded-postgres#32
zonkyio/embedded-postgres#40

Also see:

zonkyio/embedded-postgres#11
zonkyio/embedded-postgres#11 (comment)

for the original solution regarding the LC_CTYPE and LC_ALL environment
variables.

Closes #80
Closes #152
  • Loading branch information
sleberknight authored Feb 28, 2021
1 parent b7dd58c commit 127c46f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.ExtensionContext;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* @implNote See the implementation note in {@link PostgresAppTestExtensionTest}.
*/
@DisplayName("PostgresAppTestExtension: ConfigOverrides")
@EnabledOnOs(OS.LINUX)
class PostgresAppTestExtensionConfigOverridesTest {

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,12 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.ExtensionContext;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
* @implNote Due to several known issues in the zonkyio / embedded-postgres library on macOS Catalina,
* we are enabling this only on Linux at present. See issues
* <a href="https://github.com/zonkyio/embedded-postgres/issues/32">32</a>,
* <a href="https://github.com/zonkyio/embedded-postgres/issues/40">40</a> for more details.
* Also, issue <a href="https://github.com/zonkyio/embedded-postgres/issues/11">11</a> is related and
* <a href="https://github.com/zonkyio/embedded-postgres/issues/11#issuecomment-533468269">this comment</a>
* explains how to "fix" by exporting {@code LC_CTYPE} and {@code LC_ALL} environment variables if you want
* to run this test on macOS.
*/
@DisplayName("PostgresAppTestExtension")
@EnabledOnOs(OS.LINUX)
class PostgresAppTestExtensionTest {

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.kiwiproject.test.jdbi.Jdbi3GeneratedKeys;

Expand All @@ -26,7 +24,6 @@
@DisplayName("PostgresLiquibaseTestExtension")
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@SuppressWarnings({"SqlNoDataSourceInspection", "SqlDialectInspection"})
@EnabledOnOs(OS.LINUX)
class PostgresLiquibaseTestExtensionTest {

@RegisterExtension
Expand Down

0 comments on commit 127c46f

Please sign in to comment.