mlab-lattice / lattice

Apache License 2.0
1 stars 3 forks source link

Mock lattice API #157

Open abdulito opened 6 years ago

abdulito commented 6 years ago

1- Implement a mock Lattice API that the LaaS folks can use. Kevin mentions there is a "Backend" interface you can implement to provide the mock.

2- Develop Lattice API unit tests based on the mock.

abdulito commented 6 years ago

I had a meeting with kevin/will about this yesterday and started working on it today.

abdulito commented 6 years ago

Made good progress so far. Implemented mock create system, deploy, teardown.

doug-ol commented 6 years ago

@abdulito can you update your status?

abdulito commented 6 years ago

Happy path for mock is mostly implemented. I still have to implement secrets. I also created a unit test for the mock that can be found below. Maybe folks can start looking at this. @BenElgar @robcarlan-mlab

https://github.com/mlab-lattice/lattice/blob/7c3fd4ca8524c2f444bcb1197c6b69c18e807ab9/pkg/api/server/mock/server_test.go

abdulito commented 6 years ago

Got working on this again. Still in progress and now trying to make the unit test cover all basic cases

abdulito commented 6 years ago

I am pretty much done with this. I am gonna create a PR for it today and update the ticket with information on how to operate the mock API server

abdulito commented 6 years ago

Created a pull request.

For folks who want to see how to setup the mock api server then please refer to the test suite:

https://github.com/mlab-lattice/lattice/blob/21b561dbf1f5e31933ed9e7d6ba58750d1b07472/pkg/api/server/mock/server_test.go#L407

abdulito commented 6 years ago

Updated PR per kevins review

abdulito commented 6 years ago

Update PR to include testing for jobs. Also synced my branch with master

abdulito commented 6 years ago

Need a way for provisioning the mock API. Using a flag or something

abdulito commented 6 years ago

This is good to go.

We created a new command for starting mock api server and built a docker image for that

command is cmd/mock/api-server and docker image is mock-api-server. I'll write up the command help for that