Skip to content

Commit 46118a0

Browse files
pPrecelhalamix2
andauthored
Apply suggestions from code review
Co-authored-by: Piotr Halama <[email protected]>
1 parent fe97849 commit 46118a0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

internal/cmd/alpha/module/enable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ func newEnableCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command {
2424
}
2525

2626
cmd := &cobra.Command{
27-
Use: "enable",
27+
Use: "enable <module>",
2828
Short: "Enable module.",
29-
Long: "Use this command to enabele module.",
29+
Long: "Use this command to enable module.",
3030
Args: cobra.ExactArgs(1),
3131
Run: func(cmd *cobra.Command, args []string) {
3232
cfg.module = args[0]

internal/kube/kyma/kyma_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ func fixModuleTemplate(moduleName string) *unstructured.Unstructured {
569569
}
570570

571571
func Test_client_WaitForModuleState(t *testing.T) {
572-
t.Run("match stete", func(t *testing.T) {
572+
t.Run("match state", func(t *testing.T) {
573573
scheme := runtime.NewScheme()
574574
scheme.AddKnownTypes(GVRKyma.GroupVersion())
575575
client := client{dynamic_fake.NewSimpleDynamicClient(scheme, fixDefaultKyma())}

internal/modules/enable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func applyCustomCR(writer io.Writer, ctx context.Context, client kube.Client, mo
4646
return nil
4747
}
4848

49-
fmt.Fprintf(writer, "waiting for module to be ready")
49+
fmt.Fprintf(writer, "waiting for module to be ready\n")
5050
err := client.Kyma().WaitForModuleState(ctx, module, "Ready", "Warning")
5151
if err != nil {
5252
return clierror.Wrap(err, clierror.New("failed to check module state"))

internal/modules/enable_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func TestEnable(t *testing.T) {
6767

6868
err := enable(buffer, context.Background(), &client, "keda", "fast", false, testKedaCR)
6969
require.Nil(t, err)
70-
require.Equal(t, "adding keda module to the Kyma CR\nwaiting for module to be readyapplying kyma-system/default cr\nkeda module enabled\n", buffer.String())
70+
require.Equal(t, "adding keda module to the Kyma CR\nwaiting for module to be ready\napplying kyma-system/default cr\nkeda module enabled\n", buffer.String())
7171
require.Equal(t, []fake.FakeEnabledModule{expectedEnabledModule}, kymaClient.EnabledModules)
7272
require.Equal(t, []unstructured.Unstructured{testKedaCR}, rootlessDynamicClient.ApplyObjs)
7373
})
@@ -130,6 +130,6 @@ func TestEnable(t *testing.T) {
130130

131131
err := enable(buffer, context.Background(), &client, "keda", "fast", false, testKedaCR)
132132
require.Equal(t, expectedCliErr, err)
133-
require.Equal(t, "adding keda module to the Kyma CR\nwaiting for module to be readyapplying kyma-system/default cr\n", buffer.String())
133+
require.Equal(t, "adding keda module to the Kyma CR\nwaiting for module to be ready\napplying kyma-system/default cr\n", buffer.String())
134134
})
135135
}

0 commit comments

Comments
 (0)