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

Pipeline getTaskStatus Tests #2807

Merged

Conversation

andrewballantyne
Copy link
Contributor

@andrewballantyne andrewballantyne commented Sep 22, 2019

Added more tests for the pipeline-augment utilities. I broke the work into two commits so rework of logic is tracked separately from the tests written to test the logic.

  • 1st Commit - Rework of types/logic
    • Had to change some of the types to match live data (structures were off)
    • I made a functionality change to the getTaskStatus utility to produce a smaller result on the other end as it blindly created properties on the object it never modified (so they were always 0)
  • 2nd Commit - Tests and test data
  PipelineAugment test getRunStatusColor handles all runStatus values
    ✓ expect all but PipelineNotStarted to produce a non-default result (1ms)
    ✓ expect all status colors to return visible text to show in a tooltip
  PipelineAugment test correct task status state is pulled from pipeline/pipelineruns
    ✓ expect no arguments to produce a net-zero result
    Successfully completed Pipelines
      ✓ expect a simple pipeline to have task-count equal to Succeeded states
      ✓ expect a complex pipeline to have task-count equal to Succeeded states
    In Progress pipelines
      ✓ expect a simple pipeline to have task-count equal to Pending, Running and Succeeded states (1ms)
      ✓ expect a complex pipeline to have task-count equal to Pending, Running and Succeeded states
    Failed / Cancelled pipelines
      ✓ expect a partial pipeline to have task-count equal to Failed and Cancelled states
      ✓ expect a cancelled complex pipeline to have task-count equal to Failed and Cancelled states

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. component/core Related to console core functionality component/dev-console Related to dev-console labels Sep 22, 2019
@andrewballantyne andrewballantyne force-pushed the pipeline-tests branch 2 times, most recently from 2fa7f13 to 7cf9268 Compare September 23, 2019 16:33
@andrewballantyne andrewballantyne changed the title Pipeline getTaskStatus Tests [WIP] Pipeline getTaskStatus Tests Sep 26, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2019
@andrewballantyne
Copy link
Contributor Author

Noticed there is an area I didn't cover while fixing up the data - will need to rework the tests (while I trim the data)

@spadgett spadgett changed the base branch from master-4.3 to master September 26, 2019 14:36
@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 27, 2019
@andrewballantyne andrewballantyne changed the title [WIP] Pipeline getTaskStatus Tests Pipeline getTaskStatus Tests Sep 27, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 27, 2019
@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, christianvogt

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2019
@openshift-merge-robot openshift-merge-robot merged commit c42fce2 into openshift:master Sep 30, 2019
@spadgett spadgett added this to the v4.3 milestone Oct 4, 2019
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. component/core Related to console core functionality component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants