Skip to content

Commit 86747ab

Browse files
committed
docs: update specs for first-profile auto-default behavior
- Add "First profile auto-defaults" scenario to config/profiles - Update "Profile add default with Docker presets" in both specs - Update "Profile add with explicit flags" in cli/profile-command-structure
1 parent 0fd371e commit 86747ab

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

specs/cli/profile-command-structure/spec.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ The `profile` subcommand is available as `exapump profile`. It does not require
3535

3636
* *GIVEN* no config file exists
3737
* *WHEN* the user runs `exapump profile add default`
38-
* *THEN* the config file MUST be created at `~/.exapump/config.toml`
39-
* *AND* a `[default]` section MUST be written with `host = "localhost"`, `port = 8563`, `user = "sys"`, `password = "exasol"`, `tls = true`, `validate_certificate = false`
40-
* *AND* stdout MUST confirm the profile was added with the preset values
38+
* *THEN* a `[default]` section MUST be written with Docker preset values
39+
* *AND* the profile MUST have `default = true` (auto-defaulted as first profile)
40+
* *AND* stdout MUST include "(set as default)"
4141

4242
### Scenario: Profile add refuses to overwrite existing
4343

@@ -84,10 +84,10 @@ The `profile` subcommand is available as `exapump profile`. It does not require
8484
### Scenario: Profile add with explicit flags
8585

8686
* *GIVEN* no config file exists
87-
* *WHEN* the user runs `exapump profile add production --host exasol-prod.example.com --port 8563 --user admin --password s3cret --no-validate-certificate`
88-
* *THEN* the config file MUST be created at `~/.exapump/config.toml`
89-
* *AND* a `[production]` section MUST be written with the provided values
90-
* *AND* stdout MUST confirm the profile was added
87+
* *WHEN* the user runs `exapump profile add production --host exasol.example.com --user admin --password secret`
88+
* *THEN* a `[production]` section MUST be written with the provided values
89+
* *AND* the profile MUST have `default = true` (auto-defaulted as first profile)
90+
* *AND* stdout MUST include "(set as default)"
9191

9292
### Scenario: Profile add with partial flags uses defaults
9393

specs/config/profiles/spec.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ The resolution priority (highest to lowest) is:
162162
* *AND* `tls` MUST map to the `tls` query parameter
163163
* *AND* `validate_certificate` MUST map to the `validateservercertificate` query parameter (`1` for true, `0` for false)
164164

165+
### Scenario: First profile auto-defaults
166+
167+
* *GIVEN* no config file exists (or config file has zero profiles)
168+
* *WHEN* the user runs `exapump profile add <name>` without `--default`
169+
* *THEN* the profile MUST be created with `default = true`
170+
* *AND* stdout MUST include "(set as default)" to indicate auto-defaulting
171+
165172
### Scenario: Profile name validation
166173

167174
* *GIVEN* a profile name is provided (via `--profile` flag or `exapump profile add <name>`)

0 commit comments

Comments
 (0)