-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved the overall Code Coverage (#25)
Improved the overall Code Coverage of the OpenHue CLI project. Added a new `make coverage` that ease verifying the code coverage.
- Loading branch information
Showing
26 changed files
with
405 additions
and
126 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package setup | ||
|
||
import ( | ||
"openhue-cli/openhue" | ||
"openhue-cli/openhue/test/assert" | ||
"testing" | ||
) | ||
|
||
func TestNewCmdAuth(t *testing.T) { | ||
|
||
cmd := NewCmdAuth(openhue.NewTestIOStreamsDiscard()) | ||
|
||
assert.ThatCmdUseIs(t, cmd, "auth") | ||
assert.ThatCmdGroupIs(t, cmd, "config") | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
package setup | ||
|
||
import "testing" | ||
import ( | ||
"openhue-cli/openhue/test/assert" | ||
"testing" | ||
) | ||
|
||
func TestNewCmdConfigure(t *testing.T) { | ||
|
||
cmd := NewCmdConfigure() | ||
|
||
if cmd.Use != "configure" { | ||
t.Fatalf("The configure 'command' name has changed to '%s'", cmd.Use) | ||
} | ||
assert.ThatCmdUseIs(t, cmd, "configure") | ||
assert.ThatCmdGroupIs(t, cmd, "config") | ||
|
||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package setup | ||
|
||
import ( | ||
"openhue-cli/openhue" | ||
"openhue-cli/openhue/test/assert" | ||
"testing" | ||
) | ||
|
||
func TestNewCmdDiscover(t *testing.T) { | ||
|
||
cmd := NewCmdDiscover(openhue.NewTestIOStreamsDiscard()) | ||
|
||
assert.ThatCmdUseIs(t, cmd, "discover") | ||
assert.ThatCmdGroupIs(t, cmd, "config") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package setup contains the commands that are used to configure and initialize the OpenHue CLI context | ||
package setup |
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
Oops, something went wrong.