We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d8c67f commit 78c2148Copy full SHA for 78c2148
CHANGELOG.md
@@ -2,6 +2,7 @@
2
3
## Enhancements
4
* Adds `IngressAttributes` field to `PolicySetVersion` by @jpadrianoGo [#1092](https://github.com/hashicorp/go-tfe/pull/1092)
5
+* Adds `ConfirmedBy` field to `Run` by @jpadrianoGo [#1110](https://github.com/hashicorp/go-tfe/pull/1110)
6
7
# v1.80.0
8
run.go
@@ -160,6 +160,7 @@ type Run struct {
160
ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"`
161
CostEstimate *CostEstimate `jsonapi:"relation,cost-estimate"`
162
CreatedBy *User `jsonapi:"relation,created-by"`
163
+ ConfirmedBy *User `jsonapi:"relation,confirmed-by"`
164
Plan *Plan `jsonapi:"relation,plan"`
165
PolicyChecks []*PolicyCheck `jsonapi:"relation,policy-checks"`
166
TaskStages []*TaskStage `jsonapi:"relation,task-stages,omitempty"`
run_integration_test.go
@@ -446,6 +446,33 @@ func TestRunsReadWithPolicyPaths(t *testing.T) {
446
assert.Contains(t, r.PolicyPaths, "./foo")
447
}
448
449
+func TestRunsConfirmedBy(t *testing.T) {
450
+ client := testClient(t)
451
+ ctx := context.Background()
452
+
453
+ t.Run("with apply", func(t *testing.T) {
454
+ rTest, rTestCleanup := createRunApply(t, client, nil)
455
+ t.Cleanup(rTestCleanup)
456
457
+ r, err := client.Runs.Read(ctx, rTest.ID)
458
+ require.NoError(t, err)
459
460
+ assert.NotNil(t, r.ConfirmedBy)
461
+ assert.NotZero(t, r.ConfirmedBy.ID)
462
+ })
463
464
+ t.Run("without apply", func(t *testing.T) {
465
+ rTest, rTestCleanup := createPlannedRun(t, client, nil)
466
467
468
469
470
+ assert.Equal(t, rTest, r)
471
472
+ assert.Nil(t, r.ConfirmedBy)
473
474
+}
475
476
func TestRunsApply(t *testing.T) {
477
client := testClient(t)
478
ctx := context.Background()
0 commit comments