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

Fix docker-env and add unit and integration tests #6604

Merged
merged 8 commits into from
Feb 13, 2020

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Feb 12, 2020

Added both unit and integration tests for docker-env command.

test with both docker and kvm driver

Before this PR:

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://172.17.0.2:2376"
export DOCKER_CERT_PATH="tcp://127.0.0.1:32874"
export MINIKUBE_ACTIVE_DOCKERD="minikube"

# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)

After this PR :

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://127.0.0.1:32841"
export DOCKER_CERT_PATH="/usr/local/google/home/medya/.minikube/certs"
export MINIKUBE_ACTIVE_DOCKERD="minikube"

# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)

closes #6600
closes #6546

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 12, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

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 Feb 12, 2020
@tstromberg
Copy link
Contributor

Do you mind adding a docker entry to env_test.go?

@tstromberg
Copy link
Contributor

tstromberg commented Feb 12, 2020

Also, is there an integration test that runs docker ps against what is returned? Even if it's just bash-specific, it would be nice to catch this.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 12, 2020
@medyagh
Copy link
Member Author

medyagh commented Feb 12, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 12, 2020
@medyagh medyagh changed the title Fix docker cert env in docker-env for docker driver Fix docker-env and add unit and integration tests Feb 12, 2020
@tstromberg
Copy link
Contributor

Lint failure:

test/integration/functional_test.go:138:2: SA4006: this value of `rr` is never used (staticcheck)
300	rr, err = Run(t, c)
301	^
302Makefile:369: recipe for target 'lint-ci' failed

@minikube-pr-bot
Copy link

All Times minikube: [ 95.833955 91.993915 93.698440]
All Times Minikube (PR 6604): [ 91.871670 94.387630 94.758049]

Average minikube: 93.842103
Average Minikube (PR 6604): 93.672450

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6604) |
+----------------------+-----------+--------------------+
| minikube v           |  0.200996 |           0.203549 |
| Creating kvm2        | 19.718525 |          19.888721 |
| Preparing Kubernetes | 50.093373 |          50.248404 |
| Pulling images       |           |                    |
| Launching Kubernetes | 21.457886 |          21.508697 |
| Waiting for cluster  |  0.051724 |           0.050020 |
+----------------------+-----------+--------------------+

@medyagh
Copy link
Member Author

medyagh commented Feb 13, 2020

fixed lint

@minikube-pr-bot
Copy link

All Times minikube: [ 94.454109 92.421270 91.599450]
All Times Minikube (PR 6604): [ 92.350928 90.824207 91.032529]

Average minikube: 92.824943
Average Minikube (PR 6604): 91.402555

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6604) |
+----------------------+-----------+--------------------+
| minikube v           |  0.197200 |           0.208009 |
| Creating kvm2        | 19.893442 |          19.610107 |
| Preparing Kubernetes | 50.159653 |          49.293271 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.513365 |          20.350200 |
| Waiting for cluster  |  0.068647 |           0.223605 |
+----------------------+-----------+--------------------+

@codecov-io
Copy link

codecov-io commented Feb 13, 2020

Codecov Report

Merging #6604 into master will not change coverage.
The diff coverage is 36.36%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6604   +/-   ##
=======================================
  Coverage   37.51%   37.51%           
=======================================
  Files         138      138           
  Lines        8792     8792           
=======================================
  Hits         3298     3298           
- Misses       5078     5080    +2     
+ Partials      416      414    -2
Impacted Files Coverage Δ
cmd/minikube/cmd/docker-env.go 39.83% <36.36%> (ø) ⬆️

@minikube-pr-bot
Copy link

All Times minikube: [ 92.883412 87.392601 90.922051]
All Times Minikube (PR 6604): [ 97.037286 94.931300 94.773415]

Average minikube: 90.399354
Average Minikube (PR 6604): 95.580667

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6604) |
+----------------------+-----------+--------------------+
| minikube v           |  0.225134 |           0.198086 |
| Creating kvm2        | 20.170219 |          20.171272 |
| Preparing Kubernetes | 48.026547 |          51.366552 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.000610 |          21.891226 |
| Waiting for cluster  |  0.219855 |           0.241984 |
+----------------------+-----------+--------------------+

@k8s-ci-robot k8s-ci-robot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 13, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 13, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 13, 2020
@minikube-pr-bot
Copy link

All Times minikube: [ 91.279304 94.006040 93.822893]
All Times Minikube (PR 6604): [ 91.536026 93.898284 92.012377]

Average minikube: 93.036079
Average Minikube (PR 6604): 92.482229

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6604) |
+----------------------+-----------+--------------------+
| minikube v           |  0.206499 |           0.202772 |
| Creating kvm2        | 20.183795 |          20.151431 |
| Preparing Kubernetes | 49.940577 |          49.854166 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.956622 |          20.412887 |
| Waiting for cluster  |  0.046799 |           0.224631 |
+----------------------+-----------+--------------------+

@medyagh medyagh merged commit 25167e1 into kubernetes:master Feb 13, 2020
@medyagh medyagh deleted the fix_docker_cert branch May 2, 2020 22:31
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker-env broken on cert path add integration test for docker-env
6 participants