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 Test Package #1567

Merged
merged 8 commits into from
Jun 17, 2021
Merged

Create Test Package #1567

merged 8 commits into from
Jun 17, 2021

Conversation

theunrepentantgeek
Copy link
Member

What this PR does / why we need it:

Eliminates most duplication of test support infrastructure, allowing reuse across multiple packages.

Doesn't eliminate all copies of FakeFunction as we can't move the uses within astmodel out without causing a package reference cycle.

Special notes for your reviewer:

Will be making more reuse of methods in an upcoming PR, testing functions.

How does this PR make you feel:
gif

Copy link
Member

@babbageclunk babbageclunk left a comment

Choose a reason for hiding this comment

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

Looks good!

name string
Imported *astmodel.PackageReferenceSet
Referenced astmodel.TypeNameSet
TypeReturned astmodel.Type
Copy link
Member

@babbageclunk babbageclunk Jun 16, 2021

Choose a reason for hiding this comment

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

super minor: I have a slight preference for ReturnType here.
Oh, I see that you did this to make it consistent with Imported and Referenced. But actually present tense (Imports, References) feels more natural for those too, and I quite like that they can also be read as plural nouns as well since they're sets. 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, the function ReturnType() is on the Function interface, so I couldn't use ReturnType for the member name here.

@codecov-commenter
Copy link

Codecov Report

Merging #1567 (0b6c838) into master (a4d3a51) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1567   +/-   ##
=======================================
  Coverage   63.41%   63.41%           
=======================================
  Files         178      181    +3     
  Lines       11739    11793   +54     
=======================================
+ Hits         7444     7479   +35     
- Misses       3628     3645   +17     
- Partials      667      669    +2     
Impacted Files Coverage Δ
hack/generator/pkg/test/asserts.go 71.42% <71.42%> (ø)
hack/generator/pkg/test/file_definition.go 77.77% <77.77%> (ø)
.../codegen/pipeline_add_cross_resource_references.go 91.76% <100.00%> (+0.62%) ⬆️
hack/generator/pkg/test/fake_function.go 53.12% <100.00%> (ø)

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 2ceb10b...0b6c838. Read the comment docs.

@theunrepentantgeek theunrepentantgeek merged commit 69e8589 into master Jun 17, 2021
@theunrepentantgeek theunrepentantgeek deleted the feature/test-package branch June 17, 2021 01:45
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.

3 participants