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

Adding integrations test for the CLI commands related to pipelines. #125

Merged
merged 9 commits into from
Nov 8, 2018

Conversation

vicaire
Copy link
Contributor

@vicaire vicaire commented Nov 7, 2018

This change is Reviewable


// Create pipeline
args := []string{"pipeline", "create",
"https://storage.googleapis.com/ml-pipeline-dataset/sequential.yaml"}
Copy link
Member

Choose a reason for hiding this comment

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

can you copy the file in resources/ folder and refer it there? it makes test more self contained, and reduce test flakiness.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This "pipeline create" call is supposed to take a URL as a parameter.

The "pipeline upload" call is testing uploading a local file.

Is there a way to use "pipeline create" with a local file?

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about the other API. my bad. please ignore.

}

func (c *CLIIntegrationTest) deletePipelines() error {

Copy link
Member

Choose a reason for hiding this comment

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

extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

assert.Nil(t, err)
}

func (c *CLIIntegrationTest) TestPipelineCreateGetDeleteSuccess() {
Copy link
Member

Choose a reason for hiding this comment

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

i see you called List in delete step, but maybe have a section below to test list explicitly, and add some assertions against the list results too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a TestPipelineListSuccess above.

For the test organization, I assuming the following:

  • The API server e2e tests will check that the clients return the correct results.
  • The CLI unit tests verify that what is returned by the API server is correctly converted to the CLI output.
  • These tests simply verify that the connection between the CLI and API server works.

As an alternative, if you are open to it, we could delete the API server e2e tests and rely on the CLI e2e tests for all the API tests... It seems that this would save a lot of work and make sure we deliver CLI updates quickly. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a check on the "pipeline list" output:

  • checked that the resulting pipelines can be parsed
  • checked that there is at least one of them.

@IronPan
Copy link
Member

IronPan commented Nov 7, 2018

/lgtm

@vicaire
Copy link
Contributor Author

vicaire commented Nov 7, 2018

/retest

@k8s-ci-robot k8s-ci-robot removed the lgtm label Nov 7, 2018
@vicaire
Copy link
Contributor Author

vicaire commented Nov 7, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vicaire

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

@IronPan
Copy link
Member

IronPan commented Nov 8, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit ca58fa3 into master Nov 8, 2018
Linchin pushed a commit to Linchin/pipelines that referenced this pull request Apr 11, 2023
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
HumairAK added a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
feat(backend): Add metadata field to scheduled workflow
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