Open hades200082 opened 1 year ago
Thanks for the suggestion! In the meantime, you can delete all test data on the account with a single click via the Dashboard.
The problem I'm facing is that I have products in the test environment that I need to keep. Deleting the test data manually is at best tedious and at worst impossible.
Yeah this is quite the disappointment. Deleting all your test data also deletes all the products etc. that you carefully crafted, not just the mock products created by the CLI. Found out the hard way...
Doing a google search for stripe test webhooks
, I discovered the stripe-cli 'trigger' function and merrily went about developing and refining my webhook integration. I even created a handy wrapper script to display both sides of the operation in a split-pane screen session. Later, I went to my dashboard to change some settings and discovered the awful mess I'd made (Vat of Acid episode, Rick & Morty). Doing a full-wipe of my test-mode environment is not an option, as I have valuable prototype and longer-term test data that I need to keep.
If stripe-cli won't track and clean up the data it creates, we need some other options. Here are some suggestions.
test-mode
is misleading. It's not really a mode, it's an environment. If we could create/delete test environments on-the-fly, we could avoid making a mess in our "main" development environment.stripe trigger
will create a lot of data in the test environment with the only remedy being to delete ALL data.I've stopped using trigger now.
Instead I create the event by using the checkout, then I replay the events that created as needed.
@hades200082 Cool, are you using the CLI to replay, or is that a dashboard-only function?
I use the CLI to replay it.
Problem
Use the Stripe CLI to build out integrations without interfering with other users creating test products that are effectively "drafts" waiting to move to production or getting in their way.
As it stands the Stripe CLI can create hundreds or thousands of products, customers, etc. in a single day of development and testing. It's unacceptable that this test data is left in my test account with no simple way to remove it without also removing the test data I created manually (i.e. the drafts of what will be my live plans/products eventually)
Feature
trigger
command.As I see it the stripe CLI is creating a mess in my test account. It's the CLIs responsibility to clean up after itself.
Also see: