Skip to content

Commit b998eb6

Browse files
committed
chore(serviceaccount): remove redundant test cases
1 parent 1d628c7 commit b998eb6

3 files changed

Lines changed: 0 additions & 58 deletions

File tree

stackit/internal/services/serviceaccount/account/resource_test.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,6 @@ func TestMapFields(t *testing.T) {
7979
Model{},
8080
false,
8181
},
82-
{
83-
"nil_response_2",
84-
&serviceaccount.ServiceAccount{},
85-
Model{},
86-
false,
87-
},
88-
{
89-
"no_email",
90-
&serviceaccount.ServiceAccount{
91-
ProjectId: "pid",
92-
Id: "550e8400-e29b-41d4-a716-446655440000",
93-
},
94-
Model{},
95-
false,
96-
},
97-
{
98-
"no_id",
99-
&serviceaccount.ServiceAccount{
100-
ProjectId: "pid",
101-
Email: "mail",
102-
},
103-
Model{},
104-
false,
105-
},
10682
}
10783
for _, tt := range tests {
10884
t.Run(tt.description, func(t *testing.T) {

stackit/internal/services/serviceaccount/accounts/datasource_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,26 +122,6 @@ func TestMapDataSourceFields(t *testing.T) {
122122
},
123123
isValid: true,
124124
},
125-
{
126-
description: "skip_nil_email",
127-
apiItems: []serviceaccount.ServiceAccount{
128-
{Email: emailA, Id: idA},
129-
{Email: ""}, // Should be skipped
130-
},
131-
initialModel: ServiceAccountsModel{
132-
ProjectId: types.StringValue(projectId),
133-
SortAscending: types.BoolValue(true),
134-
},
135-
expectedModel: ServiceAccountsModel{
136-
Id: types.StringValue(projectId),
137-
ProjectId: types.StringValue(projectId),
138-
SortAscending: types.BoolValue(true),
139-
Items: []ServiceAccountItem{
140-
{Email: types.StringValue(emailA), Name: types.StringValue(nameA), ServiceAccountId: types.StringValue(idA)},
141-
},
142-
},
143-
isValid: true,
144-
},
145125
{
146126
description: "nil_model",
147127
apiItems: []serviceaccount.ServiceAccount{},

stackit/internal/services/serviceaccount/key/resource_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ func TestMapResponse(t *testing.T) {
7979
expected: Model{},
8080
isValid: false,
8181
},
82-
{
83-
description: "nil_response_2",
84-
input: &serviceaccount.CreateServiceAccountKeyResponse{},
85-
expected: Model{},
86-
isValid: false,
87-
},
88-
{
89-
description: "no_id",
90-
input: &serviceaccount.CreateServiceAccountKeyResponse{
91-
Active: true,
92-
},
93-
expected: Model{},
94-
isValid: false,
95-
},
9682
}
9783

9884
for _, tt := range tests {

0 commit comments

Comments
 (0)