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

Test failure in 3.4.x build #266

Open
3 tasks done
john-h-kastner-aws opened this issue Dec 17, 2024 · 0 comments
Open
3 tasks done

Test failure in 3.4.x build #266

john-h-kastner-aws opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@john-h-kastner-aws
Copy link
Contributor

john-h-kastner-aws commented Dec 17, 2024

Before opening, please confirm:

Bug Category

Other

Describe the bug

The Java build fails with

> Task :test

PolicyFormatterTests > testPoliciesStrToPrettyWithConfig() FAILED
    org.opentest4j.AssertionFailedError: expected: <permit (
        principal,
        action == Action::"update",
        resource
    )
    when { resource.owner == principal };
    > but was: <permit (
        principal,
        action == Action::"update",
        resource
    )
    when { resource.owner == principal };>
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
        at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)
        at app//com.cedarpolicy.PolicyFormatterTests.testPoliciesStrToPrettyWithConfig(PolicyFormatterTests.java:64)

14613 tests completed, 1 failed

when run as part of the downstream build from CI in the cedar repository. This presumably impacts a local build, but I have not tried to reproduce. Likely related to most recent commit to the 3.4.x release branch #241 which did touch the formatter tests.

The difference is just a missing trailing new line in the actual output, so the fix is probably just to update the expected output to remove it, but we should first check that no trailing new-line is the expected output and there isn't something funny happening that might cause a new line to be lost in the JNI layer.

Expected behavior

.

Reproduction steps

.

Code Snippet

// Put your code below this line.

Log output

// Put your output below this line

Additional configuration

No response

Operating System

No response

Additional information and screenshots

No response

@john-h-kastner-aws john-h-kastner-aws added bug Something isn't working pending-triage Hasn't been triaged yet and removed pending-triage Hasn't been triaged yet labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant