Skip to content

Commit ec2065e

Browse files
author
Andrew Farries
committed
Rename --api-key-file to --stripe-secret-path
1 parent 3650249 commit ec2065e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

components/usage/cmd/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func run() *cobra.Command {
7979

8080
cmd.Flags().BoolVar(&verbose, "verbose", false, "Toggle verbose logging (debug level)")
8181
cmd.Flags().DurationVar(&schedule, "schedule", 1*time.Hour, "The schedule on which the reconciler should run")
82-
cmd.Flags().StringVar(&apiKeyFile, "api-key-file", "", "Location of the Stripe credentials file on disk")
82+
cmd.Flags().StringVar(&apiKeyFile, "stripe-secret-path", "", "Location of the Stripe credentials file on disk")
8383

8484
return cmd
8585
}

install/installer/pkg/components/usage/deployment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
5050
ReadOnly: true,
5151
})
5252

53-
args = append(args, fmt.Sprintf("--api-key-file=%s", filepath.Join(stripeSecretMountPath, stripeKeyFilename)))
53+
args = append(args, fmt.Sprintf("--stripe-secret-path=%s", filepath.Join(stripeSecretMountPath, stripeKeyFilename)))
5454
}
5555
return nil
5656
})

install/installer/pkg/components/usage/deployment_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestDeployment_EnablesPaymentWhenAStripeSecretIsPresent(t *testing.T) {
6565
require.Len(t, containers, 2)
6666

6767
usageContainer := containers[0]
68-
expectedArgument := fmt.Sprintf("--api-key-file=%s", filepath.Join(stripeSecretMountPath, stripeKeyFilename))
68+
expectedArgument := fmt.Sprintf("--stripe-secret-path=%s", filepath.Join(stripeSecretMountPath, stripeKeyFilename))
6969

7070
require.Contains(t, usageContainer.Args, expectedArgument)
7171
}
@@ -85,6 +85,6 @@ func TestDeployment_DisablesPaymentWhenAStripeSecretIsNotPresent(t *testing.T) {
8585
usageContainer := containers[0]
8686

8787
for _, arg := range usageContainer.Args {
88-
require.NotContains(t, arg, "--api-key-file")
88+
require.NotContains(t, arg, "--stripe-secret-path")
8989
}
9090
}

0 commit comments

Comments
 (0)