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

Increase main coverage #526

Merged

Conversation

jodh-intel
Copy link
Contributor

No description provided.

Add a new comment and move an existing one to the correct location.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add a "defaultErrorFile" variable for parity with "defaultOutputFile"
and to allow testing the fatal() function (which now uses
defaultErrorFile).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add variables for CLI flags, commands and the before function and setup
the CLI app using these variables. This simplifies main() and will make
testing easier.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Introduced an explicity command-not-found handler to handle unknown
sub-commands. Previously, if the runtime was invoked with an unknown
command, it would error with:

    $ cc-runtime i-am-an-unknown-command
    No help topic for 'i-am-an-unknown-command'

It now errors with:

    $ cc-runtime i-am-an-unknown-command
    Invalid command "i-am-an-unknown-command"

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Added a variable and function to generate the full version string to
simplify main() and allow for easier testing.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
If makeVersionString() is unable to generate a version string, display the
particular version element as "<<unknown>>" rather than defaulting to "".

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Restructured main() into a single call to make testing easier.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Added standard license header to "version_test.go".

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add new tests to raise the unit-test coverage for "main.go" from 0% to 98.5%.

Fixes clearcontainers#396.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@coveralls
Copy link

coveralls commented Sep 7, 2017

Coverage Status

Coverage increased (+7.6%) to 97.04% when pulling 8c8b651 on jodh-intel:increase-main-coverage into 2b2602d on clearcontainers:master.

@clearcontainersbot
Copy link

Popular Images qa-passed 👍

@jodh-intel
Copy link
Contributor Author

Once this is merged, we can close #93.

@sameo
Copy link

sameo commented Sep 7, 2017

LGTM

Approved with PullApprove Approved with PullApprove

@jodh-intel jodh-intel merged commit aa5993d into clearcontainers:master Sep 8, 2017
mcastelino pushed a commit to mcastelino/runtime that referenced this pull request Dec 6, 2018
Remove the `initcall_debug` boot option from the kernel command-line as
we don't need it any more and it generates a ton of boot messages that
may well be impacting performance.

Fixes clearcontainers#526.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants