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

Microservice test: Does the CNF have a reasonable container image size? #155

Closed
8 of 22 tasks
lixuna opened this issue Apr 22, 2020 · 9 comments · Fixed by #205
Closed
8 of 22 tasks

Microservice test: Does the CNF have a reasonable container image size? #155

lixuna opened this issue Apr 22, 2020 · 9 comments · Fixed by #205
Assignees
Labels
5 pts microservice Test the microservice cloud native properties of a CNF sprint6 Sprint 6: April 24 - May 6 workload

Comments

@lixuna
Copy link
Collaborator

lixuna commented Apr 22, 2020

Acceptance Criteria

Microservice test: Does the CNF have a reasonable container image size?

EPIC: CNF Conformance Test Suite

Release: MVP

Test Category: Microservice

Type of test (static or runtime) = Runtime

  • example code: POC ISSUE_NUMBER > N/A

Environment set up tasks:

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

Sample CNF tasks:

Code implementation tasks:

  • TBD

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Needs Peer Review column
    • create Pull Request and follow check list
    • Assign 1 or more people for peer review
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Reviewer Approved column
    • Approve pull request
  • if no,
    • document what did not go as expected, including error messages and screenshots (if possible)
    • Add comment to pull request
    • request changes to pull request
@lixuna lixuna added workload microservice Test the microservice cloud native properties of a CNF labels Apr 22, 2020
@lixuna
Copy link
Collaborator Author

lixuna commented Apr 28, 2020

Level of effort in pts: 0,1,2,3,5,8,13,21: 5pts

@denverwilliams 3
@williscool 3
@wavell 5
@taylor 5
@lixuna 5

@lixuna lixuna added the 5 pts label Apr 28, 2020
@lixuna
Copy link
Collaborator Author

lixuna commented Apr 28, 2020

Acceptance Criteria:

Acceptance Criteria for peer review:

--

Common steps

  • Find or create a K8s cluster to use
    • Steps for creating will be in another ticket
    • Talk with team for access to an existing cluster
  • Set the KUBECONFIG environment variable for accessing the target K8s cluster
  • As a developer, Pull down latest version of CNF conformance test code from develop branch
  • As a peer reviewer, Pull down latest version of CNF conformance test code from master branch
  • Run shards install
  • Run crystal spec
  • I expect to see PASSED for the tests

When using the test crystal src/cnf-conformance.cr reasonable_image_size command the sample "good" CNF should PASS test successfully:

  • Run crystal src/cnf-conformance.cr setup
  • Run crystal src/cnf-conformance.cr sample_coredns_setup
  • Run crystal src/cnf-conformance.cr reasonable_image_size
  • I expect to see the output and results from the test
  • I expect to see PASSED for the test

When using the test crystal spec --tag reasonable_image_size command the sample "good" CNF should PASS and the "bad" oversized image example should FAIL test:

  • Run crystal spec --tag reasonable_image_size
  • I expect to see the output and results from the test
  • I expect to see "PASSED: compliant image size" (for example)
  • I expect to see "FAILURE: non-compliant image size" (for example)

I would expect the CNF to pass when I run the entire test category suite (microservice)

  • Run crystal src/cnf-conformance.cr setup
  • Run crystal src/cnf-conformance.cr sample_coredns_setup
  • Run crystal src/cnf-conformance.cr microservice (this is a new test category)
  • I expect to see the output and results from all tests in the test category
  • I expect to see PASSED for the test category

I would expect the CNF to pass when I run the entire test suite (all)

  • Follow common steps above
  • Run crystal src/cnf-conformance.cr all
  • I expect to see the output from the test
  • I expect to see PASSED for the test

@lixuna lixuna changed the title Microservice test: What is the container image size of a CNF? Microservice test: Does the CNF have a reasonable container image size? Apr 30, 2020
@lixuna lixuna closed this as completed Apr 30, 2020
@lixuna lixuna reopened this Apr 30, 2020
@taylor
Copy link
Collaborator

taylor commented Apr 30, 2020

@wavell some emoji:

General

PASS: ✔️

FAIL: ❌

Specific to this test:

PASS:

  • ✔️ Reasonable container image size🏋️🎈

FAIL:

  • ❌Unreasonable container image size🏋️‼️ 🙅

Reference:

@taylor
Copy link
Collaborator

taylor commented Apr 30, 2020

Recommend having the status at the start and other emojis after. Example Kind:

Creating cluster "test1" ...
✓ Ensuring node image (kindest/node:v1.17.0) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
⢄⡱ Starting control-plane 🕹️

@taylor
Copy link
Collaborator

taylor commented May 7, 2020

Future improvement:

@lixuna
Copy link
Collaborator Author

lixuna commented May 7, 2020

@williscool this is a new test category. Has it been added to the documentation?

in the description:

Documentation tasks:

  • Update Test Categories md if needed
  • Update Pseudo Code md if needed
  • Update USAGE md if needed
  • Update installation instructions if needed

@williscool
Copy link
Collaborator

☺ ➔  crystal src/cnf-conformance.cr reasonable_image_size
PASSED: Image size is good

@williscool
Copy link
Collaborator

micro_size: 13398749
PASSED: Image size is good


...

micro_size: 7230926577
FAILURE: Image size too large
.

Finished in 1:41 minutes
2 examples, 0 failures, 0 errors, 0 pending

@williscool
Copy link
Collaborator

Final score: 54
Results have been saved to cnf-conformance-results-20200507-161413-213.yml


---
name: cnf conformance
status:
points:
items:
- name: privileged
  status: passed
  points: 5
- name: increase_capacity
  status: passed
  points: 10
- name: decrease_capacity
  status: passed
  points: 10
- name: ip_addresses
  status: failed
  points: -1
- name: liveness
  status: passed
  points: 5
- name: readiness
  status: passed
  points: 5
- name: install_script_helm
  status: passed
  points: 5
- name: helm_chart_valid
  status: passed
  points: 5
- name: helm_chart_published
  status: passed
  points: 5
- name: reasonable_image_size
  status: passed
  points: 5
- name: reasonable_startup_time
  status: passed
  points: 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 pts microservice Test the microservice cloud native properties of a CNF sprint6 Sprint 6: April 24 - May 6 workload
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants