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

Create Python Test for Generated Files #829

Merged
merged 6 commits into from
Jan 21, 2022

Conversation

AlgoStephenAkiki
Copy link
Contributor

@AlgoStephenAkiki AlgoStephenAkiki commented Jan 19, 2022

Resolves #405

Adds a python script that can be used to test that go generate did not
modify any files

Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

.

Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

Can you change the test so that we don't need to update the md5 file? i.e. create it before running go generate and check that the file wasn't modified afterward.

The CI script also needs to be updated to call the new script.

Also please move this to the misc directory.

Resolves #405

Adds a python script that can be used to test that go generate did not
modify any files
@AlgoStephenAkiki AlgoStephenAkiki force-pushed the feature/405-integration-test-for-generated-files branch from ce9a520 to faf764f Compare January 20, 2022 17:48
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2022

Codecov Report

Merging #829 (ba48333) into develop (1313f26) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #829   +/-   ##
========================================
  Coverage    59.31%   59.31%           
========================================
  Files           32       32           
  Lines         4095     4095           
========================================
  Hits          2429     2429           
  Misses        1368     1368           
  Partials       298      298           

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 1313f26...ba48333. Read the comment docs.

@AlgoStephenAkiki AlgoStephenAkiki force-pushed the feature/405-integration-test-for-generated-files branch from cb4e702 to c3e6541 Compare January 20, 2022 18:05
@AlgoStephenAkiki AlgoStephenAkiki force-pushed the feature/405-integration-test-for-generated-files branch from 53987aa to 02240f3 Compare January 20, 2022 21:30
list_of_directories=["../idb/postgres/internal/schema"]

for dir in list_of_directories:
os.system("/usr/local/go/bin/go generate {}".format(dir))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work without specifying the full path to go? It needs to be on the path for everything else so I think it's a fair assumption as long as it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not work without it unfortunately

@winder winder self-requested a review January 21, 2022 20:33
@winder winder merged commit 6828b4e into develop Jan 21, 2022
@winder winder deleted the feature/405-integration-test-for-generated-files branch January 21, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

integration test for generated files
3 participants