@@ -71,6 +71,28 @@ func TestStackDeploymentRunsList(t *testing.T) {
71
71
require .NoError (t , err )
72
72
assert .NotNil (t , runList )
73
73
})
74
+
75
+ t .Run ("With include option" , func (t * testing.T ) {
76
+ t .Parallel ()
77
+
78
+ runList , err := client .StackDeploymentRuns .List (ctx , deploymentGroupID , & StackDeploymentRunListOptions {
79
+ Include : []SDRIncludeOpt {"stack-deployment-group" },
80
+ })
81
+ assert .NoError (t , err )
82
+ assert .NotNil (t , runList )
83
+ for _ , run := range runList .Items {
84
+ assert .NotNil (t , run .StackDeploymentGroup .ID )
85
+ }
86
+ })
87
+
88
+ t .Run ("With invalid include option" , func (t * testing.T ) {
89
+ t .Parallel ()
90
+
91
+ _ , err := client .StackDeploymentRuns .List (ctx , deploymentGroupID , & StackDeploymentRunListOptions {
92
+ Include : []SDRIncludeOpt {"invalid-option" },
93
+ })
94
+ assert .Error (t , err )
95
+ })
74
96
}
75
97
76
98
func TestStackDeploymentRunsRead (t * testing.T ) {
@@ -126,6 +148,20 @@ func TestStackDeploymentRunsRead(t *testing.T) {
126
148
_ , err := client .StackDeploymentRuns .Read (ctx , "" )
127
149
assert .Error (t , err )
128
150
})
151
+ t .Run ("Read with options" , func (t * testing.T ) {
152
+ run , err := client .StackDeploymentRuns .ReadWithOptions (ctx , sdr .ID , & StackDeploymentRunReadOptions {
153
+ Include : []SDRIncludeOpt {"stack-deployment-group" },
154
+ })
155
+ assert .NoError (t , err )
156
+ assert .NotNil (t , run )
157
+ assert .NotNil (t , run .StackDeploymentGroup .ID )
158
+ })
159
+ t .Run ("Read with invalid options" , func (t * testing.T ) {
160
+ _ , err := client .StackDeploymentRuns .ReadWithOptions (ctx , sdr .ID , & StackDeploymentRunReadOptions {
161
+ Include : []SDRIncludeOpt {"invalid-option" },
162
+ })
163
+ assert .Error (t , err )
164
+ })
129
165
}
130
166
131
167
func TestStackDeploymentRunsApproveAllPlans (t * testing.T ) {
0 commit comments