Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brianstrauch committed Aug 17, 2021
1 parent 4b3b1d4 commit 521e3ec
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 83 deletions.
6 changes: 3 additions & 3 deletions internal/cmd/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func TestHelp_Cloud(t *testing.T) {
require.NoError(t, err)

commands := []string{
"admin", "api-key", "audit-log", "cloud-signup", "completion", "config", "connector", "connector-catalog",
"environment", "help", "iam", "init", "kafka", "ksql", "login", "logout", "price", "prompt", "schema-registry",
"secret", "service-account", "shell", "update", "version",
"admin", "api-key", "audit-log", "cloud-signup", "completion", "config", "connect", "environment", "help",
"iam", "init", "kafka", "ksql", "login", "logout", "price", "prompt", "schema-registry", "secret",
"service-account", "shell", "update", "version",
}

for _, command := range commands {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/connect/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (suite *ConnectTestSuite) SetupTest() {

func (suite *ConnectTestSuite) newCmd() *command {
prerunner := cliMock.NewPreRunnerMock(&ccloud.Client{Connect: suite.connectMock, Kafka: suite.kafkaMock}, nil, nil, suite.conf)
cmd := New(prerunner, suite.analyticsClient)
cmd := New(suite.conf, prerunner, suite.analyticsClient)
return cmd
}

Expand Down
12 changes: 2 additions & 10 deletions test/fixtures/output/connect/connect-help.golden
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
Manage Kafka Connect.

Usage:
<<<<<<< HEAD:test/fixtures/output/connector/connector-help.golden
confluent connector [command]
=======
ccloud connect [command]
>>>>>>> 2.0:test/fixtures/output/connect/connect-help.golden
confluent connect [command]

Available Commands:
create Create a connector.
Expand All @@ -22,8 +18,4 @@ Global Flags:
-h, --help Show help for this command.
-v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).

<<<<<<< HEAD:test/fixtures/output/connector/connector-help.golden
Use "confluent connector [command] --help" for more information about a command.
=======
Use "ccloud connect [command] --help" for more information about a command.
>>>>>>> 2.0:test/fixtures/output/connect/connect-help.golden
Use "confluent connect [command] --help" for more information about a command.
12 changes: 2 additions & 10 deletions test/fixtures/output/connect/connect-plugin-help.golden
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
Show plugins and their configurations.

Usage:
<<<<<<< HEAD:test/fixtures/output/connector-catalog/connector-catalog-help.golden
confluent connector-catalog [command]
=======
ccloud connect plugin [command]
>>>>>>> 2.0:test/fixtures/output/connect/connect-plugin-help.golden
confluent connect plugin [command]

Available Commands:
describe Describe a connector plugin type.
Expand All @@ -15,8 +11,4 @@ Global Flags:
-h, --help Show help for this command.
-v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).

<<<<<<< HEAD:test/fixtures/output/connector-catalog/connector-catalog-help.golden
Use "confluent connector-catalog [command] --help" for more information about a command.
=======
Use "ccloud connect plugin [command] --help" for more information about a command.
>>>>>>> 2.0:test/fixtures/output/connect/connect-plugin-help.golden
Use "confluent connect plugin [command] --help" for more information about a command.
42 changes: 8 additions & 34 deletions test/fixtures/output/help/help-cloud-windows.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,29 @@ Usage:
confluent [command]

Available Commands:
<<<<<<< HEAD:test/fixtures/output/help/help-cloud-windows.golden
admin Perform administrative tasks for the current organization.
api-key Manage the API keys.
audit-log Manage audit log configuration.
cloud-signup Sign up for Confluent Cloud.
completion Print shell completion code.
config Modify the CLI configuration.
connector Manage Kafka Connect.
connector-catalog Catalog of connectors and their configurations.
environment Manage and select Confluent Cloud environments.
help Help about any command
iam Manage RBAC and IAM permissions.
init Initialize a context.
kafka Manage Apache Kafka.
ksql Manage ksqlDB applications.
login Log in to Confluent Cloud or Confluent Platform.
logout Log out of Confluent Cloud.
price See Confluent Cloud pricing information.
prompt Print Confluent CLI context for your terminal prompt.
schema-registry Manage Schema Registry.
secret Manage secrets for Confluent Platform.
service-account Manage service accounts.
shell Run the confluent shell.
update Update the Confluent CLI.
version Show version of the Confluent CLI.
=======
admin Perform administrative tasks for the current organization.
api-key Manage the API keys.
audit-log Manage audit log configuration.
cloud-signup Sign up for Confluent Cloud.
completion Print shell completion code.
config Modify the CLI configuration.
connect Manage Kafka Connect.
environment Manage and select ccloud environments.
environment Manage and select Confluent Cloud environments.
help Help about any command
iam Manage RBAC and IAM permissions.
init Initialize a context.
kafka Manage Apache Kafka.
ksql Manage ksqlDB applications.
login Log in to Confluent Cloud.
login Log in to Confluent Cloud or Confluent Platform.
logout Log out of Confluent Cloud.
price See Confluent Cloud pricing information.
prompt Print Confluent Cloud CLI context for your terminal prompt.
prompt Print Confluent CLI context for your terminal prompt.
schema-registry Manage Schema Registry.
secret Manage secrets for Confluent Platform.
service-account Manage service accounts.
shell Run the ccloud shell.
signup Sign up for Confluent Cloud.
update Update the Confluent Cloud CLI.
version Show version of the Confluent Cloud CLI.
>>>>>>> 2.0:test/fixtures/output/help-flag-fail.golden
shell Run the confluent shell.
update Update the Confluent CLI.
version Show version of the Confluent CLI.

Flags:
-h, --help Show help for this command.
Expand Down
49 changes: 24 additions & 25 deletions test/fixtures/output/help/help-cloud.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,30 @@ Usage:
confluent [command]

Available Commands:
admin Perform administrative tasks for the current organization.
api-key Manage the API keys.
audit-log Manage audit log configuration.
cloud-signup Sign up for Confluent Cloud.
completion Print shell completion code.
config Modify the CLI configuration.
connector Manage Kafka Connect.
connector-catalog Catalog of connectors and their configurations.
environment Manage and select Confluent Cloud environments.
help Help about any command
iam Manage RBAC and IAM permissions.
init Initialize a context.
kafka Manage Apache Kafka.
ksql Manage ksqlDB applications.
local Manage a local Confluent Platform development environment.
login Log in to Confluent Cloud or Confluent Platform.
logout Log out of Confluent Cloud.
price See Confluent Cloud pricing information.
prompt Print Confluent CLI context for your terminal prompt.
schema-registry Manage Schema Registry.
secret Manage secrets for Confluent Platform.
service-account Manage service accounts.
shell Run the confluent shell.
update Update the Confluent CLI.
version Show version of the Confluent CLI.
admin Perform administrative tasks for the current organization.
api-key Manage the API keys.
audit-log Manage audit log configuration.
cloud-signup Sign up for Confluent Cloud.
completion Print shell completion code.
config Modify the CLI configuration.
connect Manage Kafka Connect.
environment Manage and select Confluent Cloud environments.
help Help about any command
iam Manage RBAC and IAM permissions.
init Initialize a context.
kafka Manage Apache Kafka.
ksql Manage ksqlDB applications.
local Manage a local Confluent Platform development environment.
login Log in to Confluent Cloud or Confluent Platform.
logout Log out of Confluent Cloud.
price See Confluent Cloud pricing information.
prompt Print Confluent CLI context for your terminal prompt.
schema-registry Manage Schema Registry.
secret Manage secrets for Confluent Platform.
service-account Manage service accounts.
shell Run the confluent shell.
update Update the Confluent CLI.
version Show version of the Confluent CLI.

Flags:
-h, --help Show help for this command.
Expand Down

0 comments on commit 521e3ec

Please sign in to comment.