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

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

jonasbadstuebner
Copy link
Contributor

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

@jonasbadstuebner
Copy link
Contributor 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
Contributor 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
Copy link

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

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

LGTM

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

Signed-off-by: Jonas Badstübner <jonas.badstuebner@hetzner-cloud.de>
@felixfontein felixfontein merged commit a5ca4df into getsops:main Jun 10, 2024
9 checks passed
@felixfontein
Copy link
Contributor

@jonasbadstuebner thanks for your contribution!
@sabre1041 thanks for reviewing!

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

3 participants