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

Ypu bats tests #2004

Closed
wants to merge 11 commits into from
Closed

Conversation

edsantiago
Copy link
Member

This is a takeover of #1966

PR 1966 has languished for three weeks without activity from
submitter. In the interests of getting it online, I have
taken it over and:

  • rebased
  • fixed several misunderstandings (bugs) noted in review feedback
  • fixed a few more

I also slightly rewrote two tests (tag by id, commit with name)
that were incomprehensible to me: unnecessary mount/umount and
no actual testing of anything other than checking exit status.
I believe the new code is closer to the intention of testing
but please pay closer attention to those bits.

Also: fixed the basic 'inspect' test. It looks like at some
point in the last month #1917 added a version string to
the buildah-inspect output. The test was fixed on master,
but ypu's PR did not incorporate those fixes and the
test was breaking. I took the liberty of cleaning up
the entire test for readability and maintainability.

Sorry it took so long: I tried (unsuccessfully) to push against ypu's original PR; then it took me a while to refresh my memory from so long ago; then I kept finding new problems.

Review hint: if you reviewed the initial iterations, just go to the Commits tab and look at the last one (mine). It's smaller.

ypu and others added 11 commits December 3, 2019 06:25
Add following tests for buildah add
1. buildah add test with --chown
2. buildah add url test

Signed-off-by: Yiqiao Pu <[email protected]>
Add following test cases for commit:
- commit with name
- commit to docker-distribution

Signed-off-by: Yiqiao Pu <[email protected]>
Add following test cases for push:
  - buildah push image to containers-storage
  - buildah push image to docker-archive and oci-archive
  - buildah push image to docker and docker registry

Signed-off-by: Yiqiao Pu <[email protected]>
The permission may different in different system. Not always a fix
value. So update the scripts to get the permission during the test.

Signed-off-by: Yiqiao Pu <[email protected]>
Add some checkpoint for checking container name and id inside
the tests.

Signed-off-by: Yiqiao Pu <[email protected]>
Add check steps for inspect with container id and image id.

Signed-off-by: Yiqiao Pu <[email protected]>
PR 1966 has languished for three weeks without activity from
submitter. In the interests of getting it online, I have
taken it over and:

  - rebased
  - fixed several misunderstandings (bugs) noted in review feedback
  - fixed a few more

I also slightly rewrote two tests (tag by id, commit with name)
that were incomprehensible to me: unnecessary mount/umount and
no actual testing of anything other than checking exit status.
I believe the new code is closer to the intention of testing
but please pay closer attention to those bits.

Also: fixed the basic 'inspect' test. It looks like at some
point in the last month containers#1917 added a version string to
the buildah-inspect output. The test was fixed on master,
but ypu's PR did not incorporate those fixes and the
test was breaking. I took the liberty of cleaning up
the entire test for readability and maintainability.

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member Author

I'm going to guess that the failure is a flake. What's the magic incantation for rerunning a failed test here?

@TomSweeneyRedHat
Copy link
Member

@edsantiago I've restarted it for you. Basically you need to click on the "Details" link then on the far right side for the test that's failing you need to click the "retest" button. I'm not sure if it's visible to all or just admins.

@edsantiago
Copy link
Member Author

That explains it - I am logged in to Travis but see no retest button. Thanks for the hint and for restarting it!

@rhatdan
Copy link
Member

rhatdan commented Dec 4, 2019

I like tests. Thanks @ypu and @edsantiago
@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit e3e38a8 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⚡ Test exempted: pull fully rebased and already tested.

rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Add following test cases for commit:
- commit with name
- commit to docker-distribution

Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Add following test cases for push:
  - buildah push image to containers-storage
  - buildah push image to docker-archive and oci-archive
  - buildah push image to docker and docker registry

Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
The permission may different in different system. Not always a fix
value. So update the scripts to get the permission during the test.

Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Add some checkpoint for checking container name and id inside
the tests.

Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
Add check steps for inspect with container id and image id.

Signed-off-by: Yiqiao Pu <[email protected]>

Closes: #2004
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Dec 4, 2019
PR 1966 has languished for three weeks without activity from
submitter. In the interests of getting it online, I have
taken it over and:

  - rebased
  - fixed several misunderstandings (bugs) noted in review feedback
  - fixed a few more

I also slightly rewrote two tests (tag by id, commit with name)
that were incomprehensible to me: unnecessary mount/umount and
no actual testing of anything other than checking exit status.
I believe the new code is closer to the intention of testing
but please pay closer attention to those bits.

Also: fixed the basic 'inspect' test. It looks like at some
point in the last month #1917 added a version string to
the buildah-inspect output. The test was fixed on master,
but ypu's PR did not incorporate those fixes and the
test was breaking. I took the liberty of cleaning up
the entire test for readability and maintainability.

Signed-off-by: Ed Santiago <[email protected]>

Closes: #2004
Approved by: rhatdan
@edsantiago edsantiago deleted the ypu_bats_tests branch December 4, 2019 12:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants