forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
- Loading branch information
1 parent
5c6348e
commit 876bb57
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
package internal | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestCommand(t *testing.T) { | ||
cmd := Command() | ||
|
||
assert.NotNil(t, cmd, "Command() should return a non-nil *cobra.Command instance") | ||
|
||
expectedShortDescription := "Jaeger backend v2" | ||
assert.Equal(t, expectedShortDescription, cmd.Short, "Command short description should be '%s'", expectedShortDescription) | ||
|
||
expectedLongDescription := "Jaeger backend v2" | ||
assert.Equal(t, expectedLongDescription, cmd.Long, "Command long description should be '%s'", expectedLongDescription) | ||
|
||
assert.NotNil(t, cmd.RunE, "Command should have RunE function set") | ||
|
||
} |
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,22 @@ | ||
package internal | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestComponents(t *testing.T) { | ||
factories, err := components() | ||
|
||
assert.NoError(t, err) | ||
|
||
assert.NotNil(t, factories.Extensions) | ||
assert.NotNil(t, factories.Receivers) | ||
assert.NotNil(t, factories.Exporters) | ||
assert.NotNil(t, factories.Processors) | ||
assert.NotNil(t, factories.Connectors) | ||
|
||
_, jaegerReceiverFactoryExists := factories.Receivers["jaeger"] | ||
assert.True(t, jaegerReceiverFactoryExists) | ||
} |