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

fix(Makefile): set locale to make tests pass #1492

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonasbadstuebner
Copy link

Matching on error messages without specifying locale failed for my German setup

Error Message
--- FAIL: TestGnuPGHome_Import (0.02s)                                                                                                                                                                                                                                                                                        
    keysource_test.go:71:                                                                                                                                                                                                                                                                                                     
                Error Trace:    /home/jbadstuebner/Dokumente/git/github.com/jonasbadstuebner/sops/main/pgp/keysource_test.go:71                                                                                                                                                                                               
                Error:          Error "failed to import armored key data into GnuPG keyring (exit status 2): gpg: Keine gültigen OpenPGP-Daten gefunden.\ngpg: Anzahl insgesamt bearbeiteter Schlüssel: 0" does not contain "(exit status 2): gpg: no valid OpenPGP data found.\ngpg: Total number processed: 0"              
                Test:           TestGnuPGHome_Import                                                                                                                                                                                                                                                                          
--- FAIL: TestMasterKey_encryptWithGnuPG (0.04s)                                                                                                                                                                                                                                                                              
    --- FAIL: TestMasterKey_encryptWithGnuPG/invalid_fingerprint_error (0.00s)                                                                                                                                                                                                                                                
        keysource_test.go:303:                                                                                                                                                                                                                                                                                                
                Error Trace:    /home/jbadstuebner/Dokumente/git/github.com/jonasbadstuebner/sops/main/pgp/keysource_test.go:303                                                                                                                                                                                              
                Error:          Error "failed to encrypt sops data key with pgp: gpg: 'invalid' ist keine gültige lange Schlüssel-ID" does not contain "failed to encrypt sops data key with pgp: gpg: 'invalid' is not a valid long keyID"                                                                                   
                Test:           TestMasterKey_encryptWithGnuPG/invalid_fingerprint_error                                                                                                                                                                                                                                      
--- FAIL: TestMasterKey_decryptWithGnuPG (0.04s)                                                                                                                                                                                                                                                                              
    --- FAIL: TestMasterKey_decryptWithGnuPG/invalid_data_error (0.00s)                                                                                                                                                                                                                                                       
        keysource_test.go:507:                                                                                                                                 
                Error Trace:    /home/jbadstuebner/Dokumente/git/github.com/jonasbadstuebner/sops/main/pgp/keysource_test.go:507     
                Error:          Error "failed to decrypt sops data key with pgp: gpg: Keine gültigen OpenPGP-Daten gefunden.\ngpg: decrypt_message failed: Unbekannter Systemfehler" does not contain "gpg: no valid OpenPGP data found"
                Test:           TestMasterKey_decryptWithGnuPG/invalid_data_error                                                    
FAIL

Matching on error messages without specifying locale failed for my German setup

Signed-off-by: Jonas Badstübner <[email protected]>
@jonasbadstuebner
Copy link
Author

I'm talking about running make test locally

Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@jonasbadstuebner
Copy link
Author

Would love to see this merged for my peace of mind.

@felixfontein felixfontein requested a review from a team May 6, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants