Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable tests failing on Windows #3185

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertEndsWithRaw_Test extends PathsBaseTest {

Expand Down Expand Up @@ -71,6 +73,7 @@ void should_pass_if_actual_ends_with_other() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path file = createFile(tempDir.resolve("file"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertEndsWith_Test extends PathsBaseTest {

Expand Down Expand Up @@ -88,6 +90,7 @@ void should_pass_if_actual_ends_with_other() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path file = createFile(tempDir.resolve("file"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertExistsNoFollowLinks_Test extends PathsBaseTest {

Expand Down Expand Up @@ -54,6 +56,7 @@ void should_pass_if_actual_exists() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_a_symbolic_link_and_target_exists() throws IOException {
// GIVEN
Path target = createFile(tempDir.resolve("target"));
Expand All @@ -63,6 +66,7 @@ void should_pass_if_actual_is_a_symbolic_link_and_target_exists() throws IOExcep
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_a_symbolic_link_and_target_does_not_exist() throws IOException {
// GIVEN
Path target = tempDir.resolve("non-existent");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertExists_Test extends PathsBaseTest {

Expand Down Expand Up @@ -54,6 +56,7 @@ void should_pass_if_actual_exists() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_a_symbolic_link_and_target_exists() throws IOException {
// GIVEN
Path target = createFile(tempDir.resolve("target"));
Expand All @@ -63,6 +66,7 @@ void should_pass_if_actual_is_a_symbolic_link_and_target_exists() throws IOExcep
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_a_symbolic_link_and_target_does_not_exist() throws IOException {
// GIVEN
Path target = tempDir.resolve("non-existent");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertHasFileName_Test extends PathsBaseTest {

Expand Down Expand Up @@ -90,6 +92,7 @@ void should_pass_with_existing_directory() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_with_existing_symbolic_link() throws IOException {
// GIVEN
Path actual = createSymbolicLink(tempDir.resolve("actual"), tempDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertHasNoParentRaw_Test extends PathsBaseTest {

Expand Down Expand Up @@ -54,6 +56,7 @@ void should_pass_if_actual_has_no_parent() {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path root = tempDir.getRoot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertHasNoParent_Test extends PathsBaseTest {

Expand Down Expand Up @@ -71,6 +73,7 @@ void should_pass_if_actual_has_no_parent() {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path root = tempDir.getRoot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertHasParentRaw_Test extends PathsBaseTest {

Expand Down Expand Up @@ -82,6 +84,7 @@ void should_pass_if_actual_has_expected_parent() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path expected = createDirectory(tempDir.resolve("expected"));
Expand All @@ -94,6 +97,7 @@ void should_fail_if_actual_is_not_canonical() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_expected_is_not_canonical() throws IOException {
// GIVEN
Path directory = createDirectory(tempDir.resolve("directory"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertHasParent_Test extends PathsBaseTest {

Expand Down Expand Up @@ -113,6 +115,7 @@ void should_pass_if_actual_has_expected_parent() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path expected = createDirectory(tempDir.resolve("expected"));
Expand All @@ -123,6 +126,7 @@ void should_pass_if_actual_is_not_canonical() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_expected_is_not_canonical() throws IOException {
// GIVEN
Path directory = createDirectory(tempDir.resolve("directory"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertIsCanonical_Test extends PathsBaseTest {

Expand All @@ -53,6 +55,7 @@ void should_rethrow_IOException_as_UncheckedIOException() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path file = createFile(tempDir.resolve("file"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertIsSymbolicLink_Test extends PathsBaseTest {

Expand Down Expand Up @@ -57,6 +59,7 @@ void should_fail_if_actual_is_not_a_symbolic_link() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_succeed_if_actual_is_a_symbolic_link() throws IOException {
// GIVEN
Path actual = createSymbolicLink(tempDir.resolve("actual"), tempDir.resolve("target"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertNotExists_Test extends PathsBaseTest {

Expand Down Expand Up @@ -54,6 +56,7 @@ void should_pass_if_actual_does_not_exist() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_a_symbolic_link_and_target_does_not_exist() throws IOException {
// GIVEN
Path target = tempDir.resolve("non-existent");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertStartsWithRaw_Test extends PathsBaseTest {

Expand Down Expand Up @@ -71,6 +73,7 @@ void should_pass_if_actual_starts_with_other() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path other = createDirectory(tempDir.resolve("other"));
Expand All @@ -83,6 +86,7 @@ void should_fail_if_actual_is_not_canonical() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_fail_if_other_is_not_canonical() throws IOException {
// GIVEN
Path directory = createDirectory(tempDir.resolve("directory"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

import org.assertj.core.internal.PathsBaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

class Paths_assertStartsWith_Test extends PathsBaseTest {

Expand Down Expand Up @@ -102,6 +104,7 @@ void should_pass_if_actual_starts_with_other() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_actual_is_not_canonical() throws IOException {
// GIVEN
Path other = createDirectory(tempDir.resolve("other"));
Expand All @@ -112,6 +115,7 @@ void should_pass_if_actual_is_not_canonical() throws IOException {
}

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails on Windows due to missing privileges")
void should_pass_if_other_is_not_canonical() throws IOException {
// GIVEN
Path directory = createDirectory(tempDir.resolve("directory"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand All @@ -27,6 +29,7 @@
* @author XiaoMingZHM, Eveneko
*/
@DisplayName("Convert JUnit5 assertions to AssertJ")
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Executes Linux shell scripts")
public class Convert_Junit5_Assertions_To_Assertj_Test {
private ShellScriptInvoker tester;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand All @@ -28,6 +30,7 @@
*/

@DisplayName("Convert JUnit assertions to AssertJ")
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Executes Linux shell scripts")
public class Convert_Junit_Assertions_To_Assertj_Test {
private ShellScriptInvoker conversionScriptInvoker;

Expand Down