Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

tests: add functional tests for rkt api service. #1761

Merged
merged 2 commits into from Nov 19, 2015

Conversation

yifan-gu
Copy link
Contributor

Add tests for GetInfo(), ListPods(), InspectPod()
ListImages() and InspectImage().

Fix #1668

This follows #1696 as semaphore refuses to test that branch :(

@yifan-gu yifan-gu force-pushed the api_func_test branch 2 times, most recently from 7565e78 to 9d3d948 Compare November 17, 2015 22:39
@yifan-gu
Copy link
Contributor Author

cc @alban @iaguis
The error doesn't appear now...

@yifan-gu
Copy link
Contributor Author

Update: Have run the previously failing test (TestAPIServiceGetInfo) for 1000 times on my machine, no failures so far.
Trying to run 100000 times see if I can catch it. If not, maybe merge this for now until we have more info to understand what causes the previous error?

// Read pod manifest.
//
// TODO: run "rkt cat-manifest" instead of opening the manifest file manually.
// https://github.com/coreos/rkt/issues/1730
Copy link
Member

Choose a reason for hiding this comment

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

#1730 is now merged.

@alban
Copy link
Member

alban commented Nov 18, 2015

LGTM after a rebase!

The TODO about #1730 can be done after this PR gets merged.

@yifan-gu
Copy link
Contributor Author

Actually among 16008 tests I run yesterday, there are 44 failures. It's seems reproduceable, still investigating.

@jonboulle
Copy link
Contributor

What are the failures?

@yifan-gu
Copy link
Contributor Author

What are the failures?

I have no idea so far, the process just exits with status = 2

@yifan-gu
Copy link
Contributor Author

I think I found out the reason, there is a race between the api service setting up the signal hander and the test sending the SIGINT.
There is a chance the test sends the SIGINT before the api-service setting up the signal handler, so the api service return with status = 2.

@yifan-gu
Copy link
Contributor Author

Also fixed the TODO for #1730

Add tests for GetInfo(), ListPods(), InspectPod()
ListImages() and InspectImage().
@alban
Copy link
Member

alban commented Nov 19, 2015

Well spotted, LGTM.

alban added a commit that referenced this pull request Nov 19, 2015
tests: add functional tests for rkt api service.
@alban alban merged commit 99aba43 into rkt:master Nov 19, 2015
@yifan-gu yifan-gu deleted the api_func_test branch November 19, 2015 18:07
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.

None yet

3 participants