-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(init): no overwrite prompt when adding a new profile (#3097)
- Loading branch information
Showing
7 changed files
with
148 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...s/init/testdata/test-init-cl-iv2-config-no-prompt-overwrite-for-new-profile.cassette.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) cli-e2e-test | ||
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX | ||
method: GET | ||
response: | ||
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}' | ||
headers: | ||
Content-Length: | ||
- "109" | ||
Content-Security-Policy: | ||
- default-src 'none'; frame-ancestors 'none' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 27 Apr 2023 09:09:09 GMT | ||
Server: | ||
- Scaleway API-Gateway | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
X-Request-Id: | ||
- 4765a621-1ac1-4a7f-bdb4-4602f94764eb | ||
status: 401 Unauthorized | ||
code: 401 | ||
duration: "" |
8 changes: 8 additions & 0 deletions
8
...mespaces/init/testdata/test-init-cl-iv2-config-no-prompt-overwrite-for-new-profile.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
π²π²π² EXIT CODE: 0 π²π²π² | ||
π©π©π© STDOUTοΈ π©π©π©οΈ | ||
β Initialization completed with success. | ||
π©π©π© JSON STDOUT π©π©π© | ||
{ | ||
"message": "Initialization completed with success", | ||
"details": "" | ||
} |
35 changes: 35 additions & 0 deletions
35
...init/testdata/test-init-cl-iv2-config-prompt-overwrite-for-existing-profile.cassette.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) cli-e2e-test | ||
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX | ||
method: GET | ||
response: | ||
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}' | ||
headers: | ||
Content-Length: | ||
- "109" | ||
Content-Security-Policy: | ||
- default-src 'none'; frame-ancestors 'none' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 27 Apr 2023 09:09:09 GMT | ||
Server: | ||
- Scaleway API-Gateway | ||
Strict-Transport-Security: | ||
- max-age=63072000 | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
X-Request-Id: | ||
- 314626bd-48a4-4e66-91bc-7a31b3f17210 | ||
status: 401 Unauthorized | ||
code: 401 | ||
duration: "" |
7 changes: 7 additions & 0 deletions
7
...spaces/init/testdata/test-init-cl-iv2-config-prompt-overwrite-for-existing-profile.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
π²π²π² EXIT CODE: 1 π²π²π² | ||
π₯π₯π₯ STDERRοΈοΈ π₯π₯π₯οΈ | ||
Initialization canceled | ||
π₯π₯π₯ JSON STDERR π₯π₯π₯ | ||
{ | ||
"error": "initialization canceled" | ||
} |