-
Notifications
You must be signed in to change notification settings - Fork 13
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 kind e2e #21
Add kind e2e #21
Conversation
6dc1ff5
to
ddb6413
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.
Thanks
ddb6413
to
1c808be
Compare
1c808be
to
94065e6
Compare
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
94065e6
to
6d78693
Compare
git checkout -- manifests/ | ||
} | ||
|
||
trap "cleanup" EXIT |
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.
you might want to add here SIGINT as well (unless you remove the other one)
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.
Why ? It still works:
sudo --preserve-env=PATH OCI_BIN=podman hack/e2e-kind-cluster-setup.sh
+ CNI_VERSION=0.4.0
+ OCI_BIN=podman
+ IMG_REGISTRY=localhost:5000/maiqueb
+ trap cleanup EXIT
+ setup_cluster
+ git clone https://github.com/k8snetworkplumbingwg/multus-cni/
Cloning into 'multus-cni'...
remote: Enumerating objects: 38696, done.
remote: Counting objects: 100% (1263/1263), done.
remote: Compressing objects: 100% (749/749), done.
remote: Total 38696 (delta 458), reused 1208 (delta 439), pack-reused 37433
Receiving objects: 100% (38696/38696), 49.67 MiB | 12.64 MiB/s, done.
Resolving deltas: 100% (17230/17230), done.
+ pushd multus-cni/e2e
/home/mduarted/github/multus-dynamic-networks-controller/multus-cni/e2e /home/mduarted/github/multus-dynamic-networks-controller
+ trap popd RETURN SIGINT
+ ./get_tools.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6511k 100 6511k 0 0 7275k 0 --:--:-- --:--:-- --:--:-- 32.7M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 42.9M 100 42.9M 0 0 37.6M 0 0:00:01 0:00:01 --:--:-- 37.6M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^C++ popd
/home/mduarted/github/multus-dynamic-networks-controller
+ cleanup
+ rm -rf multus-cni
+ git checkout -- manifests/
EDIT: If we omit the SIGINT in the inner trap (where I popd
) the script fails when SIGINT is used (the SIGINT signal skips the popd
and the cleanup function will fail, since it is executed from the wrong path:
sudo --preserve-env=PATH OCI_BIN=podman hack/e2e-kind-cluster-setup.sh
+ CNI_VERSION=0.4.0
+ OCI_BIN=podman
+ IMG_REGISTRY=localhost:5000/maiqueb
+ trap cleanup EXIT
+ setup_cluster
+ git clone https://github.com/k8snetworkplumbingwg/multus-cni/
Cloning into 'multus-cni'...
remote: Enumerating objects: 38696, done.
remote: Counting objects: 100% (1263/1263), done.
remote: Compressing objects: 100% (749/749), done.
remote: Total 38696 (delta 460), reused 1209 (delta 439), pack-reused 37433
Receiving objects: 100% (38696/38696), 49.71 MiB | 14.57 MiB/s, done.
Resolving deltas: 100% (17224/17224), done.
+ pushd multus-cni/e2e
/home/mduarted/github/multus-dynamic-networks-controller/multus-cni/e2e /home/mduarted/github/multus-dynamic-networks-controller
+ trap popd RETURN
+ ./get_tools.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6511k 100 6511k 0 0 4372k 0 0:00:01 0:00:01 --:--:-- 9.8M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
9 42.9M 9 4094k 0 0 10.5M 0 0:00:04 --:--:-- 0:00:04 10.4M^C++ cleanup
++ rm -rf multus-cni
++ git checkout -- manifests/
error: pathspec 'manifests/' did not match any file(s) known to git
|
||
CNI_VERSION=${CNI_VERSION:-0.4.0} | ||
OCI_BIN=${OCI_BIN:-docker} | ||
IMG_REGISTRY=${IMAGE_REGISTRY:-localhost:5000/maiqueb} |
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.
note for a possible follow PR: maybe worth to use generic registry name instead maiqueb ?
(and then the deploy need to be changed as well of course)
beside the latest nits, conceptual lgtm, thanks
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.
that'll happen if / when this repo is handed off to the k8snetworkplumbingwg.
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.
Thanks
This PR adds a kind based cluster to check the e2e functionality of the repo.
It simply runs the e2e scripts of the multus project, which for now, is more than enough for us.
Follow-up PRs will add a golang based e2e test suite to check the functionality of the project.
Fixes: #7