-
Notifications
You must be signed in to change notification settings - Fork 114
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
[infra-proxy-service] Add integration testing for infra-proxy-service #4690
Conversation
Deploy preview for chef-automate processing. Building with commit 0d3c4c7 https://app.netlify.com/sites/chef-automate/deploys/6023e4052f28ce000733e4f9 |
res, err := infraProxy.GetClients(ctx, req) | ||
assert.NoError(t, err) | ||
assert.NotNil(t, res) | ||
assert.Equal(t, 3, len(res.GetClients())) |
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.
These tests assume that we have a predefined test data loaded to the server. This is fine at this point since we do not have the API to add the data. But this needs to be addressed later.
res, err := infraProxy.GetClient(ctx, req) | ||
assert.NoError(t, err) | ||
assert.NotNil(t, res) | ||
assert.Equal(t, "chef-load-1", res.Name) |
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.
Same as above.
} | ||
|
||
// GlobalTeardown is the place where you tear everything down after we have finished | ||
func (s *Suite) GlobalTeardown() {} |
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.
Please confirm if we need to close any open connections like authn
or authz
.
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.
As I can check in this method we have performed some data cleanup like Postgres data, elastic search indices, etc, not the service connections. will investigate more on this!
Thanks!
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Kallol Roy <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Kallol Roy <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
d30050f
to
e17ba8a
Compare
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Kallol Roy <[email protected]>
// Adding the subjects if missing if gRPC calls from internal service level | ||
subjects := auth_context.FromContext(auth_context.FromIncomingMetadata(ctx)).Subjects | ||
if len(subjects) == 0 { | ||
subjects = []string{"tls:service:compliance-service:internal"} |
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.
it should be tls:service:deployment-service:internal
typo here
🔩 Description: What code changed, and why?
GetClients
andGetClient
test cases for reference. Have put chef-repo data using scripts, once we havecreate/update/delete
API ready will manage the data using APIs.⛓️ Related Resources
NA
👍 Definition of Done
infra_service_integration
hab command available for integration testing.👟 How to Build and Test the Change
start_all_service
# if not already startedsource .studio/infra-proxy-service
infra_service_integration
✅ Checklist
📷 Screenshots, if applicable
Signed-off-by: Vivek Singh [email protected]
Aha! Link: https://chef.aha.io/epics/SH-E-443