This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
fleetctl: destroy fix and more tests #1439
Merged
tixxdz
merged 11 commits into
coreos:master
from
endocode:tixxdz/fleet-destroy-and-tests-v1
Feb 24, 2016
Merged
fleetctl: destroy fix and more tests #1439
tixxdz
merged 11 commits into
coreos:master
from
endocode:tixxdz/fleet-destroy-and-tests-v1
Feb 24, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functional tests pass! |
@@ -0,0 +1,148 @@ | |||
// Copyright 2014 CoreOS, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date
This looks fine at a high level but a few comments about the implementation. Looks like a fair amount of copy pasted code so hoping we can share that. |
@jonboulle Updated and all comments handled, waiting to be green |
@@ -26,6 +28,68 @@ import ( | |||
"github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-semver/semver" | |||
) | |||
|
|||
type commandTestResults struct { | |||
Description string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these don't need to be exported
Two more comments then LGTM |
Just make it a const var that can be used or adapted if needed later.
Add IsErrorUnitNotFound() and use it in destroy to check if the error indicates that the unit does not exist. For the moment we just want to check if the error is 'unit not found', if later we want more we may export a more generic function into cAPI.
…e conditions Make the test more smarter by checking for race conditions and output result. Sometimes you may see normal output sometimes no output between the two goroutines which is normal, the thing to worry about is if Destroy did success or not.
…mmands() Add newFakeRegistryForCommands() function so fleetctl command tests can use it. We will add stop and unload tests which will also use this function and commandTestResults struct.
tixxdz
force-pushed
the
tixxdz/fleet-destroy-and-tests-v1
branch
from
February 24, 2016 15:43
6dcfa90
to
50c78c6
Compare
tixxdz
added a commit
that referenced
this pull request
Feb 24, 2016
fleetctl: destroy fix and more tests
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fleetctl destroy fix and more tests. It contains a follow up fix for the race condition that was discussed in this merged PR: #1417