File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package alb
22
33import (
44 "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/create"
5- keypair "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials"
5+ "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials"
66 "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/delete"
77 "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/describe"
88 "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/list"
@@ -35,7 +35,7 @@ func addSubcommands(cmd *cobra.Command, p *print.Printer) {
3535 template .NewCmd (p ),
3636 create .NewCmd (p ),
3737 update .NewCmd (p ),
38- keypair .NewCmd (p ),
38+ credentials .NewCmd (p ),
3939 describe .NewCmd (p ),
4040 delete .NewCmd (p ),
4141 pool .NewCmd (p ),
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
4242 Example : examples .Build (
4343 examples .NewExample (
4444 `Create a new credential, the password is requested interactively or read from ENV variable ` + passwordEnv ,
45- "$ stackit key-pair create --username some.user --displayname master-creds" ,
45+ "$ stackit beta alb credential create --username some.user --displayname master-creds" ,
4646 ),
4747 ),
4848 RunE : func (cmd * cobra.Command , _ []string ) error {
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ func Test_outputResult(t *testing.T) {
195195 type args struct {
196196 outputFormat string
197197 showOnlyPublicKey bool
198- keyPair alb.CredentialsResponse
198+ response alb.CredentialsResponse
199199 }
200200 tests := []struct {
201201 name string
@@ -207,7 +207,7 @@ func Test_outputResult(t *testing.T) {
207207 args : args {
208208 outputFormat : "" ,
209209 showOnlyPublicKey : false ,
210- keyPair : alb.CredentialsResponse {},
210+ response : alb.CredentialsResponse {},
211211 },
212212 wantErr : false ,
213213 },
@@ -216,7 +216,7 @@ func Test_outputResult(t *testing.T) {
216216 p .Cmd = NewCmd (p )
217217 for _ , tt := range tests {
218218 t .Run (tt .name , func (t * testing.T ) {
219- if err := outputResult (p , tt .args .outputFormat , tt .args .keyPair ); (err != nil ) != tt .wantErr {
219+ if err := outputResult (p , tt .args .outputFormat , tt .args .response ); (err != nil ) != tt .wantErr {
220220 t .Errorf ("outputResult() error = %v, wantErr %v" , err , tt .wantErr )
221221 }
222222 })
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ func TestBuildRequest(t *testing.T) {
196196func Test_outputResult (t * testing.T ) {
197197 type args struct {
198198 outputFormat string
199- keyPairs []alb.CredentialsResponse
199+ response []alb.CredentialsResponse
200200 }
201201 tests := []struct {
202202 name string
@@ -207,7 +207,7 @@ func Test_outputResult(t *testing.T) {
207207 name : "empty" ,
208208 args : args {
209209 outputFormat : "" ,
210- keyPairs : []alb.CredentialsResponse {
210+ response : []alb.CredentialsResponse {
211211 {},
212212 },
213213 },
@@ -220,7 +220,7 @@ func Test_outputResult(t *testing.T) {
220220 p := print .NewPrinter ()
221221 p .Cmd = NewCmd (p )
222222
223- if err := outputResult (p , tt .args .outputFormat , tt .args .keyPairs ); (err != nil ) != tt .wantErr {
223+ if err := outputResult (p , tt .args .outputFormat , tt .args .response ); (err != nil ) != tt .wantErr {
224224 t .Errorf ("outputResult() error = %v, wantErr %v" , err , tt .wantErr )
225225 }
226226 })
You can’t perform that action at this time.
0 commit comments