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

Mock lattice API #157

Open
abdulito opened this issue Jun 14, 2018 · 11 comments
Open

Mock lattice API #157

abdulito opened this issue Jun 14, 2018 · 11 comments
Assignees

Comments

@abdulito
Copy link
Contributor

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 abdulito self-assigned this Jun 14, 2018
@abdulito
Copy link
Contributor Author

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

@abdulito
Copy link
Contributor Author

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

@doug-ol
Copy link

doug-ol commented Jun 26, 2018

@abdulito can you update your status?

@abdulito
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@abdulito
Copy link
Contributor Author

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 abdulito mentioned this issue Jul 30, 2018
@abdulito
Copy link
Contributor Author

Created a pull request.

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

fmt.Println("Setting up test. Starting API Server")

@abdulito
Copy link
Contributor Author

abdulito commented Aug 2, 2018

Updated PR per kevins review

@abdulito
Copy link
Contributor Author

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

@abdulito
Copy link
Contributor Author

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

@abdulito
Copy link
Contributor Author

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

@mlab-lattice mlab-lattice deleted a comment from abdulito Sep 13, 2018
@mlab-lattice mlab-lattice deleted a comment from abdulito Sep 13, 2018
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

No branches or pull requests

2 participants