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

Use local timezone to compare on TestViewRepo2 #10446

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

6543
Copy link
Member

@6543 6543 commented Feb 24, 2020

error if you have location set on your system:

--- FAIL: TestViewRepo2 (1.80s)                                                                                                                                                                                                                                                
    testlogger.go:73: 2020/02/24 19:17:18 ...ers/routes/routes.go:105:func1() [I] Completed GET /user3/repo3 404 Not Found in 1.595595ms                                                                                                                                       
    testlogger.go:73: 2020/02/24 19:17:19 ...ers/routes/routes.go:99:func1() [I] Started GET /user3/repo3 for                                                                                                                                                                  
    testlogger.go:73: 2020/02/24 19:17:19 ...ers/routes/routes.go:105:func1() [I] Completed GET /user3/repo3 200 OK in 14.631307ms                                                                                                                                             
    repo_test.go:71:                                                                                                                                                                                                                                                           
                Error Trace:    repo_test.go:71                                                                                                                                                                                                                                
                                                        repo_test.go:89                                                                                                                                                                                                        
                Error:          Not equal:                                                                                                                                                                                                                                     
                                expected: []integrations.file{integrations.file{fileName:"doc", commitID:"2a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitMsg:"init project", commitTime:"Wed, 14 Jun 2017 13:54:21 UTC"}, integrations.file{fileName:"README.md", commitID:"2
a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitMsg:"init project", commitTime:"Wed, 14 Jun 2017 13:54:21 UTC"}}                                                                                                                                                               
                                actual  : []integrations.file{integrations.file{fileName:"doc", commitID:"2a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitMsg:"init project", commitTime:"Wed, 14 Jun 2017 15:54:21 CEST"}, integrations.file{fileName:"README.md", commitID:"
2a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitMsg:"init project", commitTime:"Wed, 14 Jun 2017 15:54:21 CEST"}}                                                                                                                                                             
                                                                                                                                                                                                                                                                               
                                Diff:                                                                                                                                                                                                                                          
                                --- Expected                                                                                                                                                                                                                                   
                                +++ Actual                                                                                                                                                                                                                                     
                                @@ -5,3 +5,3 @@                                                                                                                                                                                                                                
                                   commitMsg: (string) (len=12) "init project",                                                                                                                                                                                                
                                -  commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC"                                                                                                                                                                               
                                +  commitTime: (string) (len=30) "Wed, 14 Jun 2017 15:54:21 CEST"                                                                                                                                                                              
                                  },                                                                                                                                                                                                                                           
                                @@ -11,3 +11,3 @@                                                                                                                                                                                                                              
                                   commitMsg: (string) (len=12) "init project",                                                                                                                                                                                                
                                -  commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC"                                                                                                                                                                               
                                +  commitTime: (string) (len=30) "Wed, 14 Jun 2017 15:54:21 CEST"                                                                                                                                                                              
                                  }                                                                                                                                                                                                                                            
                Test:           TestViewRepo2

this fix it

integrations/repo_test.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 25, 2020
@6543
Copy link
Member Author

6543 commented Feb 25, 2020

@lunny rebased :)

@codecov-io
Copy link

codecov-io commented Feb 25, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@6baa07d). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #10446   +/-   ##
=========================================
  Coverage          ?   43.67%           
=========================================
  Files             ?      586           
  Lines             ?    81391           
  Branches          ?        0           
=========================================
  Hits              ?    35546           
  Misses            ?    41440           
  Partials          ?     4405

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6baa07d...21f2cb7. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 25, 2020
@guillep2k guillep2k added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Feb 25, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 25, 2020
@6543
Copy link
Member Author

6543 commented Feb 25, 2020

ready for merge 🚀

@lunny lunny merged commit dc88b78 into go-gitea:master Feb 25, 2020
@6543 6543 deleted the tests_fix_locationfailiour branch February 25, 2020 03:08
@6543 6543 changed the title fix TestViewRepo2 Use local timezone to compare on TestViewRepo2 Feb 25, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants