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

[BUG] PURL_functions acceptance test asserts over log files with zoned timestamp #1234

Open
zregvart opened this issue Dec 18, 2023 · 1 comment
Labels
bug Something isn't working triage

Comments

@zregvart
Copy link
Member

Describe the Bug

The snapshot differs based on the time zone of the computer the acceptance tests are running on.

Steps to Reproduce

  1. cd acceptance
  2. go test -test.run 'TestFeatures/PURL_functions

Expected Behavior

A description of what you expected to happen.

Actual Behavior

--- FAIL: TestFeatures/PURL_functions (6.75s)
    suite.go:527: 1 error occurred:
        	* 
        - Snapshot - 0
        + Received + 1
        
        - time="${TIMESTAMP}" level=error msg="Parsing PURL \"this-is-not-a-valid-purl\" failed: purl scheme is not \"pkg\": \"\""
        + time="${TIMESTAMP}+01:00" level=error msg="Parsing PURL \"this-is-not-a-valid-purl\" failed: purl scheme is not \"pkg\": \"\""
          Error: success criteria not met
          ↵
        
        at ../../../../../../../../../../../../../tmp/tmp.GHLYxwb0uo/features/__snapshots__/validate_image.snap:3342

Possible Solution

Looks like custom formatter should be implemented.

@zregvart zregvart added bug Something isn't working triage labels Dec 18, 2023
@lcarva
Copy link
Member

lcarva commented Dec 18, 2023

NOTE: When this was previously encountered, a change was made to the regex. That might also be the answer here.

If we go with the approach of a custom formatter, let's be sure to clean that regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants