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

Extract business logic to base package #55

Merged
merged 4 commits into from
Aug 31, 2020
Merged

Conversation

owenfarrell
Copy link
Member

Queuing this one up for awareness.

The goal of this PR is to bring the project structure in line with other resources (e.g. github-release-resource, and more recently the registry-image-resource) which have thinner main functions responsible for deserializing/serializing content from/to the command line.

The longer term need for this change is to support more consistent testing. Unit tests that rely on the time.Now(), coupled with the additional complexity of #53 and #54, will be a challenge.

For the most part, this is a lift-and-shift of existing logic. Changes to unit tests were minimal (i.e. updating BeforeEach to use the correct types), but some unit tests for check were really testing the models and their associated validation. Those tests are now in their own suite as part of the models package.

This PR is marked as a draft until #54 is merged.

@owenfarrell owenfarrell marked this pull request as ready for review August 22, 2020 15:20
@owenfarrell owenfarrell changed the title WIP: Extract business logic to base package Extract business logic to base package Aug 22, 2020
Copy link
Contributor

@aoldershaw aoldershaw left a comment

Choose a reason for hiding this comment

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

Looks great to me! I'll leave it for @izabelacg and/or @vito to have a look before merging

@izabelacg
Copy link
Member

lgtm! 👍

@vito vito merged commit a099ab8 into concourse:master Aug 31, 2020
@owenfarrell owenfarrell deleted the command branch September 1, 2020 23:53
@chenbh chenbh added the misc label Oct 26, 2020
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.

5 participants