-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make download*()
methods work in ContainerGebSpec
#74
Conversation
There must be a more elegant way to solve this, but this seems to work. Resolves gh-72
…inerGebSpec` Allows specifying `hostName` directly in `ContainerGebSpec` specs, e.g., `String hostName = 'my.test.app'`, to streamline test setup and improve readability.
Replaced direct field access with state getters to improve readability and encapsulation. This change makes it clearer how state is accessed and managed within the class.
…ation - Converted `ContainerGebSpec` to an abstract class to ensure it is only used as a base class for other specs. - This change enforces intended usage patterns and prevents accidental instantiation of `ContainerGebSpec`.
…dSupport` Renamed `ContainerAwareDownloader` to `ContainerAwareDownloadSupport` to better reflect that it's a `DownloadSupport` implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t see another way to do this. Great Job and thanks for fixing this!
@sbglasius Do you want to take a look before I merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can fix my two suggestions if you want.
src/testFixtures/groovy/grails/plugin/geb/ContainerGebSpec.groovy
Outdated
Show resolved
Hide resolved
src/testFixtures/groovy/grails/plugin/geb/ContainerAwareDownloadSupport.groovy
Show resolved
Hide resolved
With this commit `ContainerAwareDownloadSupport` uses an inner class for delegating to `DefaultDownloadSupport` instead of duplicating all its functionality. As all `download*()` methods eventually invokes `download(Map options)` it is enough to override this method, and changing the `base` option in the map to use the proper url.
download*()
methods workdownload*()
methods work in ContainerGebSpec
@matrei Well done with the |
Resolves gh-72