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 attachedcluater e2e test #594

Merged
merged 10 commits into from
Feb 2, 2024
Merged

Conversation

LiZhenCheng9527
Copy link
Contributor

What type of PR is this?

What this PR does / why we need it:
add attachedcluater e2e test
Which issue(s) this PR fixes:
a part of #436

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for kurator-dev canceled.

Name Link
🔨 Latest commit fe94542
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/65bc894c3887c00008e5f2d2

Signed-off-by: LiZhenCheng9527 <[email protected]>
@LiZhenCheng9527
Copy link
Contributor Author

@hzxuzhonghu This PR is ready for review.

KUBECONFIG_PATH=${KUBECONFIG_PATH:-"${HOME}/.kube"}
MAIN_KUBECONFIG=${MAIN_KUBECONFIG:-"${KUBECONFIG_PATH}/kurator-host.config"}
export KUBECONFIG=${MAIN_KUBECONFIG}
VERSION=${VERSION:-"0.95.27"}
Copy link
Member

Choose a reason for hiding this comment

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

Please change to using the commit id

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

Dis you test it?

REPO_ROOT=$(git rev-parse --show-toplevel)
DIR="$(cd "$(dirname "$0")" && pwd)"

"$DIR"/attachedcluster.sh
Copy link
Member

Choose a reason for hiding this comment

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

We can use go code to write it

@LiZhenCheng9527
Copy link
Contributor Author

You can see the details of the e2e test in the CI of this PR.

@kurator-bot kurator-bot added size/XL and removed size/L labels Feb 1, 2024
Signed-off-by: LiZhenCheng9527 <[email protected]>
)

ginkgo.BeforeEach(func() {
namespace = "default"
Copy link
Member

Choose a reason for hiding this comment

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

nit: use a random namespace for each test

},
}
fleet := resources.NewFleet(namespace, fleetname, clusters)
fleetCreateErr := resources.CreateFleet(kuratorClient, fleet)
Copy link
Member

Choose a reason for hiding this comment

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

don't we need to check fleet status?

clusterv1a1 "kurator.dev/kurator/pkg/apis/cluster/v1alpha1"
)

var _ = ginkgo.Describe("[AttachedClusters] AttachedClusters testing", func() {
Copy link
Member

Choose a reason for hiding this comment

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

we need to cleanup the resources created per test

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

@kurator-bot kurator-bot merged commit f81b410 into kurator-dev:main Feb 2, 2024
13 checks passed
@LiZhenCheng9527 LiZhenCheng9527 mentioned this pull request Feb 2, 2024
3 tasks
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.

3 participants