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

Add Integration tests #61

Merged

Conversation

akshaymankar
Copy link
Member

Fixes #40

There are two tests which can also serve as exmaples:

  1. simple: reads KUBECONFIG from environment to create a client. Then uses the client to create a namespace and a deployment in the namespace. It then verifies if the deployment exists.
  2. in-cluster: assumes it is running in a cluster and creates a namespace.

Other changes to travis config:

  1. Use GHC 8.6.5 instead of 8.6.3.
  2. Use lts-14 instead of 13.
  3. Removed GHC 8.0.2 as it was not working after update to Kubernetes 1.16 #60.
  4. Run all stack builds with --fast for speed and also to avoid travis timeout.
  5. Replace stack --install-ghc query locals with stack --system-ghc query locals in cabal builds. This removes unnecessary installation of ghc in ~/.stack.
  6. Remove all the commented out builds to reduce noise.
  7. Move default stack build on top to get quicker feedback on default way of building.

My travis-foo isn't great, so I couldn't figure out how to add jobs and also keep the matrix, so I just added to the matrix. If someone has a better idea, please feel free to suggest :)

Click here to see the last run of the config. It is fast because most things are cached, a new PR would take much longer to run.

For all of this to be useful we should either switch on travis builds for this repository or translate this work to prow. I saw a conversation about it here: kubernetes/org#651. I looked at prow for a bit, seems like we can get much better parallelism(much needed) and also pr tooling (arguable if we need it). But we'd definitely miss the matrix feature, caching and osx builds.

Anyhoo, I think we should enable travis builds for now and consider translating separately. From the conversation linked above I understand only members of @kubernetes-client/haskell-admins can enable travis builds. So I request one of them to please do so :)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 14, 2019
@akshaymankar
Copy link
Member Author

/approve cancel

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2019
@jonschoning
Copy link
Contributor

FYI, there is nothing wrong with ghc-8.0.2 .

It is with a bug introduced in time >= 1.9.1
haskell/time#119

lts-4.7 is not on time-1.9.1 yet, so that's why we haven't seen the error in stack builds.

akshaymankar added a commit to akshaymankar/kubernetes-test-infra that referenced this pull request Nov 20, 2019
akshaymankar added a commit to akshaymankar/kubernetes-test-infra that referenced this pull request Nov 20, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2020
@akshaymankar
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 19, 2020
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: https://support.linuxfoundation.org/
  • Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: [email protected]

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 19, 2020
@akshaymankar
Copy link
Member Author

I am sorry this got stuck in the whole conversation about travis/prow. I think we should just merge the pull request and look at the prow separately.

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 20, 2020
akshaymankar added a commit to akshaymankar/kubernetes-test-infra that referenced this pull request Jul 9, 2020
akshaymankar added a commit to akshaymankar/kubernetes-test-infra that referenced this pull request Jul 12, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 19, 2020
@akshaymankar
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 19, 2020
@akshaymankar akshaymankar reopened this Jul 21, 2020
dunnevan pushed a commit to dunnevan/test-infra that referenced this pull request Jul 29, 2020
@jonschoning
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2020
@jonschoning
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonschoning

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2020
@k8s-ci-robot k8s-ci-robot merged commit 1820c33 into kubernetes-client:master Sep 1, 2020
@akshaymankar akshaymankar deleted the integration-tests branch September 1, 2020 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test on travis
4 participants