-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix integration tests #7827
Fix integration tests #7827
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7827 +/- ##
==========================================
- Coverage 12.42% 10.20% -2.23%
==========================================
Files 42 18 -24
Lines 4248 1009 -3239
==========================================
- Hits 528 103 -425
+ Misses 3679 905 -2774
+ Partials 41 1 -40
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
c373e3b
to
f481e40
Compare
f481e40
to
b7ec552
Compare
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.
Awesome! I left a few comments.
b7ec552
to
30a9c96
Compare
/approve |
/hold I am actively reviewing. |
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.
Just a few questions, nice work, @sagor999 !
3. To test gitlab integration, add `-gitlab=true` | ||
4. All other tests. | ||
|
||
To run the 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.
Are you able to run the tests against a preview environment namespace? Like for this branch, as an example?
I know the goal was to get it running against workspace-preview, but it would be interesting to see how it fairs here, too.
Ideally we'd also be able to use these tests against core-dev (a set of namespaces in a single GKE cluster). Pretty soon core-dev will be replaced with Hertzner, where each preview environment (branch) gets a single node K3s cluster.
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.
Hm. There is something with permissions when trying to run go tests in core-dev. when test calls kubectl it cannot access kubeconfig.
And also you cannot run it via docker container due to permissions:
kubectl apply -f integration.yaml
serviceaccount/integration-svc created
job.batch/integration-job created
Error from server (Forbidden): error when creating "integration.yaml": roles.rbac.authorization.k8s.io is forbidden: User "pavel@gitpod.io" cannot create resource "roles" in API group "rbac.authorization.k8s.io" in the namespace "staging-kyleb-installer-integration": requires one of ["container.roles.create"] permission(s).
Error from server (Forbidden): error when creating "integration.yaml": rolebindings.rbac.authorization.k8s.io is forbidden: User "pavel@gitpod.io" cannot create resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "staging-kyleb-installer-integration": requires one of ["container.roleBindings.create"] permission(s).
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 sorry I missed your response from a couple days ago! 🙏
I rebased with main and did ec61d39 to get the tests runnable in werft against core-dev. May I ask for you to review?
I just tried kubectl apply
and had similar trouble in core-dev, which may be intentional (in hindsight) so that we do not "break" core-dev for other namespaces. In other words, kubectl apply
is probably best for us (in hindsight) in single node clusters dedicated to ourselves (workspace preview, harvester, etc.)
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.
Looks good, thank you!
30a9c96
to
95b0747
Compare
28713df
to
661f27a
Compare
661f27a
to
ec61d39
Compare
@kylos101 |
/unhold Excellent work @sagor999 ! Super stoked that we can run tests again. |
/LGTM |
LGTM label has been added. Git tree hash: 003cc00ee0c1d28a42017c05fc921c514cf8f26c
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kylos101, utam0k Associated issue: #7675 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Fixes integrations tests. Made sure it runs manually via
go
ordocker
.Added optional parameters to test additional tests (for example one that requires enterprise license or gitlab integration).
Related Issue(s)
Fixes #7675
How to test
Spin up new cluster via
workspace-preview
and follow steps in README.md file for manual testing via runninggo test
directly or via docker container that werft builds.Release Notes
Documentation