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

Plugin sync (for kubernetes target) e2e tooling and test cases implementation #132

Merged

Conversation

chandrareddyp
Copy link
Contributor

@chandrareddyp chandrareddyp commented Mar 24, 2023

What this PR does / why we need it

This PR implements plugin sync e2e test cases for the Kubernetes target; use cases being covered are below:
Use case 1: Create a KIND cluster, don't apply CRD and CRs, create context, and make sure no plugins are installed
Use case 2: Create a KIND cluster, apply CRD and CRs, create context, should install all plugins, uninstall the specific plugin, and perform plugin sync
Use case 3: Test plugin sync when the central repo does not have all plugin CRs being applied in a KIND cluster
Use case 4: test delete context use case; it should uninstall plugins installed for the context
Use case 5: test switch context use case, make installed plugins should be updated as per the context

Which issue(s) this PR fixes

Fixes ##144

Describe testing done for PR

Plugin life cycle test cases executed successfully locally:
Steps to run in locally:

  1. ❯ make build
  2. ❯ make start-test-central-repo
  3. ❯ export TANZU_CLI_E2E_TEST_LOCAL_CENTRAL_REPO_URL=localhost:9876/tanzu-cli/plugins/central:small
  4. Update PATH with tanzu bin path
    ❯ export PATH=/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/bin:$PATH
  5. start plugin e2e tests:
    ❯ make e2e-cli-plugin-lifecycle-test
❯ make build
build darwin-amd64 CLI with version: v0.1.0-dev
# command-line-arguments
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
mkdir -p bin
cp /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/artifacts/darwin/amd64/cli/core/v0.1.0-dev/tanzu-cli-darwin_amd64 ./bin/tanzu
❯ make start-test-central-repo
Stopped docker test central repo
Started docker test central repo with images:
=> localhost:9876/tanzu-cli/plugins/central:small
    - a small amount of plugins matching product plugin names
    - only versions v0.0.1 and v9.9.9 can be installed
=> localhost:9876/tanzu-cli/plugins/central:large with 100 plugins
    - the same content as the small image with extra plugins for a total of 100
    - none of the 'stubXY' plugins can be installed
    - only versions v0.0.1 and v9.9.9 can be installed
=> localhost:9876/tanzu-cli/plugins/sandbox1:small
    - an extra v11.11.11 version of the plugins of the small image
=> localhost:9876/tanzu-cli/plugins/sandbox2:small
    - an extra v22.22.22 version of the plugins of the small image
❯ export TANZU_CLI_E2E_TEST_LOCAL_CENTRAL_REPO_URL=localhost:9876/tanzu-cli/plugins/central:small
❯ export PATH=/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/bin:/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/cpamuluri/.fig/bin:/Users/cpamuluri/.local/bin

❯ make e2e-cli-plugin-lifecycle-test
=== RUN   TestPluginLifecycle
Running Suite: Plugin-Lifecycle E2E Test Suite
==============================================
Random Seed: 1680268118
Will run 28 of 28 specs

[i] Executing command: tanzu plugin group search -o json
[i] Executing command: tanzu plugin search -o json
[i] Executing command: tanzu plugin source add --name dpWOo --type oci --uri localhost:9876/tanzu-cli/plugins/central:small
•[i] Executing command: tanzu plugin source list -o json
•[i] Executing command: tanzu plugin source update dpWOo --type oci --uri localhost:9876/tanzu-cli/plugins/central:small
•[i] Executing command: tanzu plugin source update dpWOo --type ociZD1 --uri localhost:9876/tanzu-cli/plugins/central:small
•[i] Executing command: tanzu plugin source delete 4Wfty
[x] error while executing command:'tanzu plugin source delete 4Wfty', error:'error while running 'tanzu plugin source delete 4Wfty', stdOut: , stdErr: [x] : cli discovery source not found
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[x] : cli discovery source not found
' stdOut: ''
•[i] Executing command: tanzu plugin source delete dpWOo
[i] Executing command: tanzu plugin source list -o json
•[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install cluster --target kubernetes --version v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin install cluster --target mission-control --version v9.9.9
[i] Executing command: tanzu plugin describe cluster --target mission-control
[i] Executing command: tanzu plugin install pinniped-auth --version v9.9.9
[i] Executing command: tanzu plugin describe pinniped-auth --target global
•[i] Executing command: tanzu plugin describe cluster --target Nykqh
[x] error while executing command:'tanzu plugin describe cluster --target Nykqh', error:'error while running 'tanzu plugin describe cluster --target Nykqh', stdOut: , stdErr: [x] : invalid target specified. Please specify correct value of `--target` or `-t` flag from 'global/kubernetes/k8s/mission-control/tmc'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[x] : invalid target specified. Please specify correct value of `--target` or `-t` flag from 'global/kubernetes/k8s/mission-control/tmc'
' stdOut: ''
•[i] Executing command: tanzu plugin describe yI8S1 --target kubernetes
[x] error while executing command:'tanzu plugin describe yI8S1 --target kubernetes', error:'error while running 'tanzu plugin describe yI8S1 --target kubernetes', stdOut: , stdErr: [x] : unable to find plugin 'yI8S1' for target 'kubernetes'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[x] : unable to find plugin 'yI8S1' for target 'kubernetes'
' stdOut: ''
•[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin delete cluster --yes --target kubernetes
[i] Executing command: tanzu plugin delete cluster --yes --target mission-control
[i] Executing command: tanzu plugin delete pinniped-auth --yes --target global
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install cluster --target kubernetes --version v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin install cluster --target mission-control --version v9.9.9
[i] Executing command: tanzu plugin describe cluster --target mission-control
[i] Executing command: tanzu plugin install pinniped-auth --target global --version v9.9.9
[i] Executing command: tanzu plugin describe pinniped-auth --target global
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install cluster --target qWpcy --version v9.9.9
[x] error while executing command:'tanzu plugin install cluster --target qWpcy --version v9.9.9', error:'error while running 'tanzu plugin install cluster --target qWpcy --version v9.9.9', stdOut: , stdErr: [x] : invalid target specified. Please specify correct value of `--target` or `-t` flag from 'global/kubernetes/k8s/mission-control/tmc'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[x] : invalid target specified. Please specify correct value of `--target` or `-t` flag from 'global/kubernetes/k8s/mission-control/tmc'
' stdOut: ''
•[i] Executing command: tanzu plugin install YtVO2
[x] error while executing command:'tanzu plugin install YtVO2', error:'error while running 'tanzu plugin install YtVO2', stdOut: , stdErr: [!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'YtVO2'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'YtVO2'
' stdOut: ''
•[i] Executing command: tanzu plugin install cluster --target kubernetes --version v9.9.9341
[x] error while executing command:'tanzu plugin install cluster --target kubernetes --version v9.9.9341', error:'error while running 'tanzu plugin install cluster --target kubernetes --version v9.9.9341', stdOut: , stdErr: [!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'cluster' for target 'kubernetes'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'cluster' for target 'kubernetes'
' stdOut: ''
•[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install cluster --group vmware-tkg/v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin install account --group vmware-tmc/v9.9.9
[i] Executing command: tanzu plugin describe account --target mission-control
•[i] Executing command: tanzu plugin install all --group vmware-tkg/v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin describe feature --target kubernetes
[i] Executing command: tanzu plugin describe kubernetes-release --target kubernetes
[i] Executing command: tanzu plugin describe management-cluster --target kubernetes
[i] Executing command: tanzu plugin describe package --target kubernetes
[i] Executing command: tanzu plugin describe secret --target kubernetes
[i] Executing command: tanzu plugin describe telemetry --target kubernetes
[i] Executing command: tanzu plugin install all --group vmware-tmc/v9.9.9
[i] Executing command: tanzu plugin describe account --target mission-control
[i] Executing command: tanzu plugin describe apply --target mission-control
[i] Executing command: tanzu plugin describe audit --target mission-control
[i] Executing command: tanzu plugin describe cluster --target mission-control
[i] Executing command: tanzu plugin describe clustergroup --target mission-control
[i] Executing command: tanzu plugin describe continuousdelivery --target mission-control
[i] Executing command: tanzu plugin describe data-protection --target mission-control
[i] Executing command: tanzu plugin describe ekscluster --target mission-control
[i] Executing command: tanzu plugin describe events --target mission-control
[i] Executing command: tanzu plugin describe helm --target mission-control
[i] Executing command: tanzu plugin describe iam --target mission-control
[i] Executing command: tanzu plugin describe inspection --target mission-control
[i] Executing command: tanzu plugin describe integration --target mission-control
[i] Executing command: tanzu plugin describe management-cluster --target mission-control
[i] Executing command: tanzu plugin describe policy --target mission-control
[i] Executing command: tanzu plugin describe secret --target mission-control
[i] Executing command: tanzu plugin describe tanzupackage --target mission-control
[i] Executing command: tanzu plugin describe workspace --target mission-control

------------------------------
• [SLOW TEST:6.463 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  plugin install from group: install a plugin from a specific plugin group
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:35
    install all plugins in each group
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:57
------------------------------
[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install all --group vmware-tkg/v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin describe feature --target kubernetes
[i] Executing command: tanzu plugin describe kubernetes-release --target kubernetes
[i] Executing command: tanzu plugin describe management-cluster --target kubernetes
[i] Executing command: tanzu plugin describe package --target kubernetes
[i] Executing command: tanzu plugin describe secret --target kubernetes
[i] Executing command: tanzu plugin describe telemetry --target kubernetes
[i] Executing command: tanzu plugin install all --group vmware-tmc/v9.9.9
[i] Executing command: tanzu plugin describe account --target mission-control
[i] Executing command: tanzu plugin describe apply --target mission-control
[i] Executing command: tanzu plugin describe audit --target mission-control
[i] Executing command: tanzu plugin describe cluster --target mission-control
[i] Executing command: tanzu plugin describe clustergroup --target mission-control
[i] Executing command: tanzu plugin describe continuousdelivery --target mission-control
[i] Executing command: tanzu plugin describe data-protection --target mission-control
[i] Executing command: tanzu plugin describe ekscluster --target mission-control
[i] Executing command: tanzu plugin describe events --target mission-control
[i] Executing command: tanzu plugin describe helm --target mission-control
[i] Executing command: tanzu plugin describe iam --target mission-control
[i] Executing command: tanzu plugin describe inspection --target mission-control
[i] Executing command: tanzu plugin describe integration --target mission-control
[i] Executing command: tanzu plugin describe management-cluster --target mission-control
[i] Executing command: tanzu plugin describe policy --target mission-control
[i] Executing command: tanzu plugin describe secret --target mission-control
[i] Executing command: tanzu plugin describe tanzupackage --target mission-control
[i] Executing command: tanzu plugin describe workspace --target mission-control

------------------------------
• [SLOW TEST:7.435 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  plugin install from group: perform all plugin installation in a group
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:73
    install all plugins in each group
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:83
------------------------------
[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install --group vmware-tkg/v9.9.9
[i] Executing command: tanzu plugin describe cluster --target kubernetes
[i] Executing command: tanzu plugin describe feature --target kubernetes
[i] Executing command: tanzu plugin describe kubernetes-release --target kubernetes
[i] Executing command: tanzu plugin describe management-cluster --target kubernetes
[i] Executing command: tanzu plugin describe package --target kubernetes
[i] Executing command: tanzu plugin describe secret --target kubernetes
[i] Executing command: tanzu plugin describe telemetry --target kubernetes
[i] Executing command: tanzu plugin install --group vmware-tmc/v9.9.9
[i] Executing command: tanzu plugin describe account --target mission-control
[i] Executing command: tanzu plugin describe apply --target mission-control
[i] Executing command: tanzu plugin describe audit --target mission-control
[i] Executing command: tanzu plugin describe cluster --target mission-control
[i] Executing command: tanzu plugin describe clustergroup --target mission-control
[i] Executing command: tanzu plugin describe continuousdelivery --target mission-control
[i] Executing command: tanzu plugin describe data-protection --target mission-control
[i] Executing command: tanzu plugin describe ekscluster --target mission-control
[i] Executing command: tanzu plugin describe events --target mission-control
[i] Executing command: tanzu plugin describe helm --target mission-control
[i] Executing command: tanzu plugin describe iam --target mission-control
[i] Executing command: tanzu plugin describe inspection --target mission-control
[i] Executing command: tanzu plugin describe integration --target mission-control
[i] Executing command: tanzu plugin describe management-cluster --target mission-control
[i] Executing command: tanzu plugin describe policy --target mission-control
[i] Executing command: tanzu plugin describe secret --target mission-control
[i] Executing command: tanzu plugin describe tanzupackage --target mission-control
[i] Executing command: tanzu plugin describe workspace --target mission-control

------------------------------
• [SLOW TEST:6.433 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  plugin install from group: perform all plugin installation in a group
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:73
    install all plugins in each group
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_lifecycle/plugin_group_lifecycle_test.go:104
------------------------------
[i] Executing command: tanzu plugin clean
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin install cluster --group 8xLqn
[x] error while executing command:'tanzu plugin install cluster --group 8xLqn', error:'error while running 'tanzu plugin install cluster --group 8xLqn', stdOut: , stdErr: [!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : could not find group '8xLqn'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : could not find group '8xLqn'
' stdOut: ''
•[i] Executing command: tanzu plugin install G1Fju --group vmware-tkg/v9.9.9
[x] error while executing command:'tanzu plugin install G1Fju --group vmware-tkg/v9.9.9', error:'error while running 'tanzu plugin install G1Fju --group vmware-tkg/v9.9.9', stdOut: , stdErr: [!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : plugin 'G1Fju' is not part of the group 'vmware-tkg/v9.9.9'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : plugin 'G1Fju' is not part of the group 'vmware-tkg/v9.9.9'
' stdOut: ''
•
Ran 28 of 28 Specs in 26.387 seconds
SUCCESS! -- 28 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestPluginLifecycle (26.41s)
PASS
coverage: 100.0% of statements
ok      github.com/vmware-tanzu/tanzu-cli/test/e2e/plugin_lifecycle     26.740s coverage: 100.0% of statements
=== RUN   TestPluginSyncLifecycle
Running Suite: Plugin-Sync-Lifecycle E2E Test Suite
===================================================
Random Seed: 1680268146
Will run 27 of 27 specs

[i] Executing command: tanzu plugin group search -o json
[i] Executing command: tanzu plugin search -o json
[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-1078
[i] Executing command: docker info
• [SLOW TEST:25.017 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  plugin install from group: install a plugin from a specific plugin group
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:24
    create KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:29
------------------------------
[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-1078 --name sync-e2e-ft2n
[i] context sync-e2e-ft2n created successfully
[i] Executing command: tanzu context list -o json
•[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context delete sync-e2e-ft2n --yes
[i] context sync-e2e-ft2n deleted successfully
[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-1078
•[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-5354
[i] Executing command: docker info

------------------------------
• [SLOW TEST:22.221 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:68
    create KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:75
------------------------------
[i] Executing command: kubectl --context kind-sync-e2e-5354 apply -f ../framework/config/cli.tanzu.vmware.com_cliplugins.yaml
[i] the config:../framework/config/cli.tanzu.vmware.com_cliplugins.yaml applied successfully to context:kind-sync-e2e-5354
[i] Executing command: kubectl --context kind-sync-e2e-5354 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-5354
[i] Executing command: kubectl --context kind-sync-e2e-5354 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-5354
[i] Executing command: kubectl --context kind-sync-e2e-5354 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-5354
•[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-5354 --name sync-e2e-AY6s
[i] context sync-e2e-AY6s created successfully
[i] Executing command: tanzu context list -o json
•[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin delete cluster --yes --target kubernetes
[i] Executing command: tanzu plugin list -o json
[i] Executing command: tanzu plugin sync
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context delete sync-e2e-AY6s --yes
[i] context sync-e2e-AY6s deleted successfully
[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-5354
•[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-9016
[i] Executing command: docker info

------------------------------
• [SLOW TEST:23.788 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:147
    create KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:154
------------------------------
[i] Executing command: kubectl --context kind-sync-e2e-9016 apply -f ../framework/config/cli.tanzu.vmware.com_cliplugins.yaml
[i] the config:../framework/config/cli.tanzu.vmware.com_cliplugins.yaml applied successfully to context:kind-sync-e2e-9016
[i] Executing command: kubectl --context kind-sync-e2e-9016 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-9016
[i] Executing command: kubectl --context kind-sync-e2e-9016 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-9016
[i] Executing command: kubectl --context kind-sync-e2e-9016 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-9016
[i] Executing command: kubectl --context kind-sync-e2e-9016 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_management-cluster_kubernetes_v9.9.996.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_management-cluster_kubernetes_v9.9.996.yaml applied successfully to context:kind-sync-e2e-9016
• [SLOW TEST:5.788 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:147
    apply CRD and CRs to KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:161
------------------------------
[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-9016 --name sync-e2e-FQ1y
[i] context sync-e2e-FQ1y created successfully
[i] Executing command: tanzu context list -o json
•[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu plugin sync
[x] error while executing command:'tanzu plugin sync', error:'error while running 'tanzu plugin sync', stdOut: , stdErr: [i] Checking for required plugins...
[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'management-cluster' for target 'kubernetes'
%!(EXTRA *exec.ExitError=exit status 1)' stdErr:'[i] Checking for required plugins...
[!] Skipping the plugins discovery image signature verification for "localhost:9876/tanzu-cli/plugins/central:small"
 
[x] : unable to find plugin 'management-cluster' for target 'kubernetes'
' stdOut: ''
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context delete sync-e2e-FQ1y --yes
[i] context sync-e2e-FQ1y deleted successfully
[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-9016
•[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-7686
[i] Executing command: docker info

------------------------------
• [SLOW TEST:22.749 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:220
    create KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:227
------------------------------
[i] Executing command: kubectl --context kind-sync-e2e-7686 apply -f ../framework/config/cli.tanzu.vmware.com_cliplugins.yaml
[i] the config:../framework/config/cli.tanzu.vmware.com_cliplugins.yaml applied successfully to context:kind-sync-e2e-7686
[i] Executing command: kubectl --context kind-sync-e2e-7686 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-7686
[i] Executing command: kubectl --context kind-sync-e2e-7686 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-7686
[i] Executing command: kubectl --context kind-sync-e2e-7686 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-7686
• [SLOW TEST:5.656 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:220
    apply CRD and CRs to KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:234
------------------------------
[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-7686 --name sync-e2e-jWYI
[i] context sync-e2e-jWYI created successfully
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context delete sync-e2e-jWYI --yes
[i] context sync-e2e-jWYI deleted successfully
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-7686
•[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-1826
[i] Executing command: docker info
[i] Executing command: docker info
[i] Executing command: kind create cluster --name sync-e2e-6084
[i] Executing command: docker info

------------------------------
• [SLOW TEST:47.367 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:280
    create KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:289
------------------------------
[i] Executing command: kubectl --context kind-sync-e2e-1826 apply -f ../framework/config/cli.tanzu.vmware.com_cliplugins.yaml
[i] the config:../framework/config/cli.tanzu.vmware.com_cliplugins.yaml applied successfully to context:kind-sync-e2e-1826
[i] Executing command: kubectl --context kind-sync-e2e-1826 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_cluster_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-1826
[i] Executing command: kubectl --context kind-sync-e2e-1826 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_feature_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-1826
[i] Executing command: kubectl --context kind-sync-e2e-1826 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_kubernetes-release_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-1826
[i] Executing command: kubectl --context kind-sync-e2e-6084 apply -f ../framework/config/cli.tanzu.vmware.com_cliplugins.yaml
[i] the config:../framework/config/cli.tanzu.vmware.com_cliplugins.yaml applied successfully to context:kind-sync-e2e-6084
[i] Executing command: kubectl --context kind-sync-e2e-6084 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_management-cluster_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_management-cluster_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-6084
[i] Executing command: kubectl --context kind-sync-e2e-6084 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_package_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_package_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-6084
[i] Executing command: kubectl --context kind-sync-e2e-6084 apply -f /Users/cpamuluri/.tanzu-cli-e2e/temp/cr_secret_kubernetes_v9.9.9.yaml
[i] the config:/Users/cpamuluri/.tanzu-cli-e2e/temp/cr_secret_kubernetes_v9.9.9.yaml applied successfully to context:kind-sync-e2e-6084
• [SLOW TEST:8.877 seconds]
[CLI-Core][Tests:E2E][Feature:Plugin-Group-lifecycle]
/Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/framework/framework.go:147
  Use case: Install KIND Cluster, Apply CRD, Apply specific plugin CRs, create context and validate plugin sync
  /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:280
    apply CRD and CRs to KIND cluster
    /Users/cpamuluri/tkg/tasks/e2e_tests/pluginSync/tanzu-cli/test/e2e/plugin_sync/plugin_sync_lifecycle_test.go:297
------------------------------
[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-1826 --name sync-e2e-0xZA
[i] context sync-e2e-0xZA created successfully
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context create --kubeconfig /Users/cpamuluri/.tanzu-cli-e2e/.kube/config --kubecontext kind-sync-e2e-6084 --name sync-e2e-7zN5
[i] context sync-e2e-7zN5 created successfully
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context use sync-e2e-7zN5
[i] Executing command: tanzu plugin list -o json
[i] Executing command: tanzu context use sync-e2e-0xZA
[i] Executing command: tanzu plugin list -o json
•[i] Executing command: tanzu context delete sync-e2e-0xZA --yes
[i] context sync-e2e-0xZA deleted successfully
[i] Executing command: tanzu context delete sync-e2e-7zN5 --yes
[i] context sync-e2e-7zN5 deleted successfully
[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-1826
[i] Executing command: docker info
[i] Executing command: kind delete cluster --name sync-e2e-6084
•
Ran 27 of 27 Specs in 180.324 seconds
**SUCCESS! -- 27 Passed | 0 Failed | 0 Pending | 0 Skipped**
--- PASS: TestPluginSyncLifecycle (180.35s)
PASS
coverage: [no statements]
ok      github.com/vmware-tanzu/tanzu-cli/test/e2e/plugin_sync  180.640s        coverage: [no statements]

Release note

Plugin sync e2e test cases are implemented for Kubernetes target

Additional information

Special notes for your reviewer

@chandrareddyp chandrareddyp requested a review from a team as a code owner March 24, 2023 16:45
@chandrareddyp chandrareddyp changed the title Plugin sync e2e tooling tests **IN PROGRESS**Plugin sync e2e tooling tests Mar 24, 2023
@chandrareddyp chandrareddyp force-pushed the plugin_sync_e2e_tooling_tests branch 4 times, most recently from a10d7c5 to 3472b82 Compare March 31, 2023 13:28
@chandrareddyp chandrareddyp changed the title **IN PROGRESS**Plugin sync e2e tooling tests Plugin sync (for kubernetes target) e2e tooling and test cases implementation Mar 31, 2023
@chandrareddyp chandrareddyp force-pushed the plugin_sync_e2e_tooling_tests branch 3 times, most recently from ada70e1 to c56f543 Compare March 31, 2023 16:36
@chandrareddyp chandrareddyp requested a review from anujc25 March 31, 2023 18:54
test/e2e/framework/framework.go Show resolved Hide resolved
test/e2e/framework/framework.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_suite_test.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_test.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_test.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_test.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_test.go Outdated Show resolved Hide resolved
test/e2e/plugin_sync/plugin_sync_lifecycle_test.go Outdated Show resolved Hide resolved
@chandrareddyp chandrareddyp force-pushed the plugin_sync_e2e_tooling_tests branch 4 times, most recently from 8ac58ac to a7f76f0 Compare April 7, 2023 22:25
@chandrareddyp chandrareddyp force-pushed the plugin_sync_e2e_tooling_tests branch from a7f76f0 to 8b20bb9 Compare April 7, 2023 22:29
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chandrareddyp chandrareddyp merged commit 70755fd into vmware-tanzu:main Apr 10, 2023
vuil pushed a commit that referenced this pull request May 3, 2023
@marckhouzam marckhouzam added this to the v0.90.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants