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

ftests: add functional tests #66

Merged
merged 1 commit into from
May 24, 2017
Merged

ftests: add functional tests #66

merged 1 commit into from
May 24, 2017

Conversation

lucab
Copy link
Contributor

@lucab lucab commented May 23, 2017

No description provided.

)

func TestGeneratorEmpty(t *testing.T) {
if !IsInContainer() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's like forking, but better!

Copy link
Collaborator

@squeed squeed left a comment

Choose a reason for hiding this comment

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

One minor suggestion, otherwise looks good.

cmd := exec.Command("torcx", "clearly-bogus")
err := cmd.Run()
if err == nil {
t.Error("expected error, got nil")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably want to check that the error code is not 253, which is rkt's exit code.

Copy link
Contributor Author

@lucab lucab May 24, 2017

Choose a reason for hiding this comment

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

Inception mode: everything here after the initial if block is run directly by testrunner inside a rkt container, so this line will never see any rkt error as it is only executed inside it. On the other hand, RunTestInContainer will propagate both rkt errors and tests failures back to the original runner.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahhhhhh, got that mixed up. Thanks!

@lucab lucab added this to the v0.1.0-alpha.2 milestone May 24, 2017
@lucab lucab merged commit 6157326 into coreos:master May 24, 2017
@lucab lucab mentioned this pull request Jun 14, 2017
9 tasks
@lucab lucab deleted the ups/func-tests branch August 4, 2017 08:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants