Skip to content

Blueprints: add unit tests to the mkdir step - #1029

Merged
adamziel merged 6 commits into
WordPress:trunkfrom
reimic:mkdir
Mar 4, 2024
Merged

Blueprints: add unit tests to the mkdir step#1029
adamziel merged 6 commits into
WordPress:trunkfrom
reimic:mkdir

Conversation

@reimic

@reimic reimic commented Feb 11, 2024

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds tests to the mkdir step.

Tests directory creation minding idempotence and recursivity.

Part of the #756 effort.

@adamziel

adamziel commented Feb 11, 2024

Copy link
Copy Markdown
Collaborator

I am slightly surprised this step allows for creation of directories with periods in their name.

Periods are valid characters in directory names, see this StackOverflow reply about forbidden characters.

Also, if you could confirm my understanding: this step never fails - it will either do what it is told to do, or do nothing (if the requested directory already exists).

I can't remember off the top of my head, but if it doesn't throw an exception when the directory already exists, then you're right.

@adamziel adamziel added [Package][@wp-playground] Blueprints [Type] Reliability Playground uptime, reliability, not crashing labels Feb 11, 2024
Comment thread packages/playground/blueprints/src/lib/steps/mkdir.spec.ts Outdated
Comment thread packages/playground/blueprints/src/lib/steps/mkdir.spec.ts Outdated
Comment thread packages/playground/blueprints/src/lib/steps/mkdir.spec.ts Outdated
Comment thread packages/playground/blueprints/src/lib/steps/mkdir.spec.ts Outdated
reimic and others added 2 commits March 4, 2024 13:06
Co-authored-by: Adam Zielinski <adam@adamziel.com>
Co-authored-by: Adam Zielinski <adam@adamziel.com>
@adamziel

adamziel commented Mar 4, 2024

Copy link
Copy Markdown
Collaborator

@reimic looks good, let's clean up the PR description and I'm happy to merge.

@adamziel
adamziel merged commit daeef68 into WordPress:trunk Mar 4, 2024
@adamziel

adamziel commented Mar 4, 2024

Copy link
Copy Markdown
Collaborator

Thank you @reimic !

@reimic
reimic deleted the mkdir branch March 26, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package][@wp-playground] Blueprints [Type] Reliability Playground uptime, reliability, not crashing

2 participants