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
Cra test gql to compass #15119
Cra test gql to compass #15119
Conversation
✅ 🥰 Documentation preview ready! 🥰
To edit notification comments on pull requests, go to your Netlify site settings. |
363ddac
to
cb0f97d
Compare
…Runtime, UnregisterRuntime
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'm posting these initial few comments just to speed up the process a little bit. Code review still in progress
@@ -5,7 +5,7 @@ MOCK_APP_IMAGE = "$(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/mock-app:$(D | |||
|
|||
.PHONY: release image | |||
|
|||
release: publish-gateway-test publish-mock-app publish-validator-test publish-compass-runtime-agent-test | |||
release: publish-compass-runtime-agent-test |
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 think we should revert this change
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.
Fixed
tests/components/application-connector/resources/charts/compass-runtime-agent-test/values.yaml
Outdated
Show resolved
Hide resolved
tests/components/application-connector/resources/charts/compass-runtime-agent-test/values.yaml
Outdated
Show resolved
Hide resolved
tests/components/application-connector/test/compass-runtime-agent/suite_test.go
Show resolved
Hide resolved
tests/components/application-connector/test/compass-runtime-agent/suite_test.go
Outdated
Show resolved
Hide resolved
...lication-connector/test/compass-runtime-agent/testkit/third_party/machinebox/graphql/LICENSE
Show resolved
Hide resolved
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.
Some additional comments from the code review. I need to check it manually though
tests/components/application-connector/test/compass-runtime-agent/config.go
Show resolved
Hide resolved
|
||
exec := func() error { | ||
id, err := gs.directorClient.RegisterApplication(compassAppName) | ||
id, err := gs.directorClient.RegisterApplication(compassAppName, scenarioName) |
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.
Shouldn't it also be assigned to the correct formation to appear in the runtime? I didn't check it manually yet, just reading the code
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'm not sure since I did not write this particular piece. We will see during tests
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.
Ok
...omponents/application-connector/test/compass-runtime-agent/testkit/director/queryprovider.go
Show resolved
Hide resolved
tests/components/application-connector/test/compass-runtime-agent/testkit/oauth/types.go
Show resolved
Hide resolved
@koala7659: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
The code looks good
/retest |
* first approach for moving graphQL client to test application * Adding director dependency * extracting oauth client to new component and making it build * continue work on graphql client implementation * finally make build graphQL client * update base image go version to the latest one * minimal set of gql client ready for tests. Unit tests pass * regenerated go mocks * adding test configuration * restore restart policy removed by accident * adding RBAC to read secrets and fixes for getting tokens * remove comments and testing app delete * adjustments of the compass runtime agent test suite for compass director client * adding rule to clusterRole to allow reading applications * Addling labeling test namespace for istio injection * Build fix * remove label from application * Remove application labels for scenarios, tenant optimisation, regenerate mocks, and unit tests fixes * Reenable commented out code in Synchronization test * Small fix for oauth clinet unit test * go mod tidy run * fixes after merge * New mutation for creating application * Adding new Director mutations: AssignApplicationToFormation, RegisterRuntime, UnregisterRuntime * Adding new Director mutations: AssignRuntimeToFormation, GetConnectionToken * Commented out testing code * makefile fix * review suggestions * change GetConnectionToken function declaration to match second PR * Add two new mutations Register/Unregister Formation * Small change in argument name * Restore old makefile content
This PR contains the implementation of GraphQL client used by compass-runtime-agent component tests to connect to Compass Director API and perform various operations needed for testing scenarios:
There is a hidden assumption here: the testing scenario always exists, and we are not adding/removing it from compass. It might be problematic