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 e2e tests #5778

Merged
Merged

Conversation

anandrkskd
Copy link
Contributor

Signed-off-by: anandrkskd [email protected]

/kind tests

What does this PR do / why we need it:
This PR adds e2e tests for odo.

Which issue(s) this PR fixes:

Fixes #5752
Fixes #5750

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Jun 1, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 946a998
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/62a066854420f4000899b960

@openshift-ci openshift-ci bot requested review from feloy and valaparthvi June 1, 2022 07:34
@odo-robot
Copy link

odo-robot bot commented Jun 1, 2022

Unit Tests on commit 252110c finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 1, 2022

Windows Tests (OCP) on commit 252110c finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 1, 2022

Validate Tests on commit 252110c finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 1, 2022

Kubernetes Tests on commit 252110c finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 1, 2022

OpenShift Tests on commit 252110c finished successfully.
View logs: TXT HTML

tests/e2escenarios/e2e-test.go Outdated Show resolved Hide resolved
tests/e2escenarios/e2e-test.go Show resolved Hide resolved
helper.ReplaceString(filepath.Join(commonVar.Context, "devfile.yaml"), "nodejs-prj1-api-abhz", componentName)

//helper.ReplaceString(filepath.Join(commonVar.Context, "devfile.yaml"), "quay.io/unknown-account/myimage", "quay.io/repository/libpod/alpine")
stdout = helper.Cmd("odo", "deploy").AddEnv("PODMAN_CMD=echo").ShouldPass().Out()
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be interesting to build the image for the e2e tests

Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but we should discuss this during a cabal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will create an issue for this one separately to track.

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

/restest

Makefile Outdated Show resolved Hide resolved
@feloy
Copy link
Contributor

feloy commented Jun 7, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jun 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jun 7, 2022
Signed-off-by: anandrkskd <[email protected]>
tests/e2escenarios/e2e-test.go Outdated Show resolved Hide resolved
tests/e2escenarios/e2e-test.go Outdated Show resolved Hide resolved
Comment on lines +163 to +166
deploymentName := "my-component"
serviceName := "my-cs"
getDeployArgs := []string{"get", "deployment", "-n", commonVar.Project}
getSVCArgs := []string{"get", "svc", "-n", commonVar.Project}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can perhaps move these to the main Context since it's common for both the sub-contexts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, Philippe recommended that we should define the these value close to tests where it's getting used.
cc @feloy

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@valaparthvi
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jun 8, 2022
@anandrkskd
Copy link
Contributor Author

/retest

@valaparthvi
Copy link
Contributor

/override prow/v4.10-integration-e2e

IBM tests pass.

@openshift-ci
Copy link

openshift-ci bot commented Jun 8, 2022

@valaparthvi: /override requires a failed status context or a job name to operate on.
The following unknown contexts were given:

  • prow/v4.10-integration-e2e

Only the following contexts were expected:

  • Kubernetes Integration Tests/Kubernetes Integration Tests
  • OpenShift Integration tests/OpenShift Integration tests
  • Unit Tests/Unit Tests
  • ci/prow/unit
  • ci/prow/v4.10-images
  • ci/prow/v4.10-integration-e2e
  • ci/prow/v4.11-images
  • netlify/odo-docusaurus-preview/deploy-preview
  • pull-ci-redhat-developer-odo-main-unit
  • pull-ci-redhat-developer-odo-main-v4.10-images
  • pull-ci-redhat-developer-odo-main-v4.10-integration-e2e
  • pull-ci-redhat-developer-odo-main-v4.11-images
  • tide
  • validator/Validate

In response to this:

/override prow/v4.10-integration-e2e

IBM tests pass.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@valaparthvi
Copy link
Contributor

/retest-required

@openshift-merge-robot openshift-merge-robot merged commit 4ba9439 into redhat-developer:main Jun 9, 2022
@anandrkskd anandrkskd deleted the add-e2e-tests branch June 9, 2022 11:42
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
* add e2e tests, add G107 in gosec as exception

Signed-off-by: anandrkskd <[email protected]>

* add error handling

Signed-off-by: anandrkskd <[email protected]>

* incorporate reviews

Signed-off-by: anandrkskd <[email protected]>

* error handling

Signed-off-by: anandrkskd <[email protected]>

* error handling

Signed-off-by: anandrkskd <[email protected]>

* disable G107 for tests only

Signed-off-by: anandrkskd <[email protected]>

* remove commented code

Signed-off-by: anandrkskd <[email protected]>

* remove tests redundant checks

Signed-off-by: anandrkskd <[email protected]>
@anandrkskd anandrkskd restored the add-e2e-tests branch September 1, 2022 10:35
@anandrkskd anandrkskd deleted the add-e2e-tests branch October 13, 2022 11:12
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. Required by Prow. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
4 participants