On 07/28/2013 12:37 AM, Hugh Perkins wrote:
To make it easier to test modifications to the EC2 plugin, I'm thinking of
creating some way of being able to add a mock EC2 cloud, in the interface, and
running builds on it, and being able to see it starting instances and so on.
This might turn out to be vaporware 1. because I might run out of time 2.
because it might be quite a complex task.
In the event that it's not vaporware, what are some thoughts about this?
From the point of view of using it, what I'd like to be able to do is actually
add an EC2 cloud (or a mock EC2 cloud) in the 'configure' web page, then create
builds, and watch it create mock instances and mock-run the build.
From a dev point of view, the use case seems to imply to me that the mock /
test harness code needs to be in 'src/main' rather than 'src/test'? Of course,
it would be cleaner if it could be in src/test (or in some mocking plugin
perhaps?)
You can have extensions in src/test, so I think you can put your mock
implementations there.
As far as details, what I'm doing so far, is:
- created MockAmazonEC2, which implements AmazonEC2, and just contains stubs
for now
- created MockEC2Cloud, which extends AmazonEC2Cloud, and overrides connect(),
returning a MockAmazonEC2 instance.
- starting to look at how to fill in methods on MockAmazonEC2, for which I guess
I will start to use Mockito
Thoughts?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
Try Jenkins Enterprise, our professional version of Jenkins
--
You received this message because you are subscribed to the Google Groups "Jenkins
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.