Skip to content

Commit e83eb37

Browse files
authored
test: add name field on test namespace (#701)
1 parent c753374 commit e83eb37

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

internal/e2e/testdata/test-human-create-usage.stderr.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ARGS:
1616
[hair-count]
1717
[is-happy]
1818
[eyes-color] (unknown | amber | blue | brown | gray | green | hazel | red | violet)
19+
[name]
1920
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
2021
[region] Region to target. If none is passed will use default region from the config (fr-par)
2122

internal/e2e/testdata/test-human-update-usage.stderr.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ARGS:
1313
[hair-count]
1414
[is-happy]
1515
[eyes-color] (unknown | amber | blue | brown | gray | green | hazel | red | violet)
16+
[name]
1617
[region] Region to target. If none is passed will use default region from the config (fr-par)
1718

1819
FLAGS:

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ func instanceUserData() *core.Command {
242242
Long: `User data is a key value store API you can use to provide data from and to your server without authentication.
243243
244244
As an example of use, Scaleway images contain the script scw-generate-ssh-keys which generates SSH server’s host keys then stores their fingerprints as user data under the key “ssh-host-fingerprints”.
245-
This way, our users can ensure they are really connecting to their Scaleway instance and they are not victim of a man-in-the-middle attack.
245+
This way, we ensure they are really connecting to their Scaleway instance and they are not victim of a man-in-the-middle attack.
246246
247247
There are two endpoints to access user data:
248248
- **From a running instance**, by using the metadata API at http://169.254.42.42/user_data.
249249
To enhance security, we only allow user data viewing and editing as root.
250250
To know if the query is issued by the root user, we only accept queries made from a local port below 1024 (by default, non-root users can’t bind ports below 1024).
251251
To specify the local port with cURL, use ` + "`" + `curl --local-port 1-1024 http://169.254.42.42/user_data` + "`" + `
252-
- **From the compute API** at using methods described bellow.
252+
- **From the instance API** at using methods described bellow.
253253
`,
254254
Namespace: "instance",
255255
Resource: "user-data",

internal/namespaces/test/v1/test_cli.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ func testHumanCreate() *core.Command {
197197
Required: false,
198198
EnumValues: []string{"unknown", "amber", "blue", "brown", "gray", "green", "hazel", "red", "violet"},
199199
},
200+
{
201+
Name: "name",
202+
Required: false,
203+
},
200204
core.OrganizationIDArgSpec(),
201205
core.RegionArgSpec(scw.RegionFrPar),
202206
},
@@ -263,6 +267,10 @@ func testHumanUpdate() *core.Command {
263267
Required: false,
264268
EnumValues: []string{"unknown", "amber", "blue", "brown", "gray", "green", "hazel", "red", "violet"},
265269
},
270+
{
271+
Name: "name",
272+
Required: false,
273+
},
266274
core.RegionArgSpec(scw.RegionFrPar),
267275
},
268276
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)