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 a new e2e provider to make test running on remote cluster #158

Merged
merged 4 commits into from
Dec 3, 2019

Conversation

weiqiangt
Copy link
Contributor

@weiqiangt weiqiangt commented Nov 28, 2019

Implemented the remote provider which accepts sshconfig file and kubeconfig file to run the e2e test on a remote Kubernetes cluster.

The provider accept two new flags:

  • remote.kubeconfig: Path of the kubeconfig of the cluster in local machine
  • remote.sshconfig: Path of the sshconfig

@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests. This command can only be run by members of the vmware-tanzu organization
  • /skip-e2e: to skip e2e tests. This command can only be run by members of the vmware-tanzu organization

@weiqiangt weiqiangt force-pushed the weiqiangt/remote-e2e-provider branch from 99df0d9 to 808b363 Compare November 28, 2019 06:46
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

I don't mind merging this as it is, we can make some improvements later (unify flags / code with other providers).

I do think that there is no need for the remote.master command-line flag so I would suggest removing it.

test/e2e/providers/remote.go Outdated Show resolved Hide resolved
var (
homedir, _ = os.UserHomeDir()
sshConfig = flag.String("remote.sshconfig", path.Join(homedir, ".ssh", "config"), "Path of the sshconfig")
masterHostname = flag.String("remote.master", "", "Hostname of the master node of the kubernetes cluster")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can do without this (like the vagrant provider) even though it means parsing the SSH config for every call to RunCommandOnNode? That would simplify usage with no significant drawback. What do you think?

Copy link
Contributor Author

@weiqiangt weiqiangt Nov 30, 2019

Choose a reason for hiding this comment

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

Sure, changed.

test/e2e/providers/remote.go Outdated Show resolved Hide resolved
test/e2e/providers/remote.go Show resolved Hide resolved
@weiqiangt weiqiangt force-pushed the weiqiangt/remote-e2e-provider branch from 808b363 to f8799d6 Compare November 30, 2019 09:50
Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
@weiqiangt weiqiangt force-pushed the weiqiangt/remote-e2e-provider branch from f8799d6 to bbefcdd Compare November 30, 2019 10:19
weiqiangt and others added 2 commits November 30, 2019 18:21
Co-Authored-By: Antonin Bas <antonin.bas@gmail.com>
Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
test/e2e/providers/remote.go Outdated Show resolved Hide resolved
test/e2e/providers/remote.go Show resolved Hide resolved
test/e2e/providers/remote.go Outdated Show resolved Hide resolved
test/e2e/providers/remote.go Show resolved Hide resolved
Addressing comments

Signed-off-by: Weiqiang TANG <weiqiangt@vmware.com>
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@tnqn
Copy link
Member

tnqn commented Dec 2, 2019

Better to update #158 (comment) as you have removed remote.master

@weiqiangt
Copy link
Contributor Author

Better to update #158 (comment) as you have removed remote.master

Thanks.

@weiqiangt
Copy link
Contributor Author

/test-e2e

@weiqiangt weiqiangt requested a review from antoninbas December 2, 2019 15:55
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM

@weiqiangt weiqiangt merged commit dc29a79 into antrea-io:master Dec 3, 2019
@weiqiangt weiqiangt deleted the weiqiangt/remote-e2e-provider branch December 3, 2019 01:10
zyiou pushed a commit to zyiou/antrea that referenced this pull request Jul 2, 2021
Delete the unrequired method of deleting record from
record map without lock.
Add a method to get the flow updated time for flow given flow key
zyiou pushed a commit to zyiou/antrea that referenced this pull request Jul 2, 2021
Reverting this commit 7c0a0ae.
Reason is the PR(antrea-io#1949) that depends on this commit
is not yet ready. And to move the tag of go-ipfix in Antrea for other
PRs this commit should be present in the latest release tags. Therefore,
reverting this.
zyiou pushed a commit to zyiou/antrea that referenced this pull request Jul 2, 2021
Delete the unrequired method of deleting record from
record map without lock.
Add a method to get the flow updated time for flow given flow key
zyiou pushed a commit to zyiou/antrea that referenced this pull request Jul 2, 2021
Delete the unrequired method of deleting record from
record map without lock.
Add a method to get the flow updated time for flow given flow key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants