mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
tests: Sets MaximumNArgs for agnhost subcommands to 0
The subcommands rely on flags, not args. Because of this, the cobra.MaximumNArgs should be set 0.
This commit is contained in:
parent
bad9e15509
commit
b633031ec5
@ -44,7 +44,7 @@ var CmdLogsGenerator = &cobra.Command{
|
|||||||
Use: "logs-generator",
|
Use: "logs-generator",
|
||||||
Short: "Outputs lines of logs to stdout uniformly",
|
Short: "Outputs lines of logs to stdout uniformly",
|
||||||
Long: "Outputs <linesTotal> lines of logs to stdout uniformly for <duration>",
|
Long: "Outputs <linesTotal> lines of logs to stdout uniformly for <duration>",
|
||||||
Args: cobra.MaximumNArgs(2),
|
Args: cobra.MaximumNArgs(0),
|
||||||
Run: generateLogs,
|
Run: generateLogs,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ var CmdNoSnatTestProxy = &cobra.Command{
|
|||||||
Use: "no-snat-test-proxy",
|
Use: "no-snat-test-proxy",
|
||||||
Short: "Creates a proxy for the /checknosnat endpoint",
|
Short: "Creates a proxy for the /checknosnat endpoint",
|
||||||
Long: `Creates the /checknosnat endpoint which proxies the request to the given target (/checknosnat?target=target_ip&ips=ip1,ip2) and returns its response, or a 500 response on error.`,
|
Long: `Creates the /checknosnat endpoint which proxies the request to the given target (/checknosnat?target=target_ip&ips=ip1,ip2) and returns its response, or a 500 response on error.`,
|
||||||
Args: cobra.MaximumNArgs(1),
|
Args: cobra.MaximumNArgs(0),
|
||||||
Run: main,
|
Run: main,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ var CmdNoSnatTest = &cobra.Command{
|
|||||||
- /whoami - returns the request's IP address.
|
- /whoami - returns the request's IP address.
|
||||||
- /checknosnat - queries "ip/whoami" for each provided IP ("/checknosnat?ips=ip1,ip2"),
|
- /checknosnat - queries "ip/whoami" for each provided IP ("/checknosnat?ips=ip1,ip2"),
|
||||||
and if all the response bodies match the "POD_IP" environment variable, it will return a 200 response, 500 otherwise.`,
|
and if all the response bodies match the "POD_IP" environment variable, it will return a 200 response, 500 otherwise.`,
|
||||||
Args: cobra.MaximumNArgs(1),
|
Args: cobra.MaximumNArgs(0),
|
||||||
Run: main,
|
Run: main,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user