diff --git a/pkg/provision/provisioner.go b/pkg/provision/provisioner.go index 9cc76140c..2fcea230e 100755 --- a/pkg/provision/provisioner.go +++ b/pkg/provision/provisioner.go @@ -97,6 +97,7 @@ func (prov *AccountProvision) ActivateAccount(create bool, PrincipalID: principalID, ID: leaseID.String(), LeaseStatus: db.Active, + LeaseStatusReason: db.LeaseActive, BudgetAmount: budgetAmount, BudgetCurrency: budgetCurrency, BudgetNotificationEmails: budgetNotificationEmails, diff --git a/pkg/provision/provisioner_test.go b/pkg/provision/provisioner_test.go index 8f38221f9..d2706f19b 100755 --- a/pkg/provision/provisioner_test.go +++ b/pkg/provision/provisioner_test.go @@ -203,9 +203,10 @@ type testActivateLeaseInput struct { func TestActivateLease(t *testing.T) { // Construct test scenarios lease := &db.RedboxLease{ - AccountID: "123", - PrincipalID: "abc", - LeaseStatus: db.Active, + AccountID: "123", + PrincipalID: "abc", + LeaseStatus: db.Active, + LeaseStatusReason: db.LeaseActive, } tests := []testActivateLeaseInput{ // Happy Path - Create @@ -221,6 +222,7 @@ func TestActivateLease(t *testing.T) { AccountID: "123", PrincipalID: "abc", LeaseStatus: db.Active, + LeaseStatusReason: db.LeaseActive, LastModifiedOn: 456, LeaseStatusModifiedOn: 789, }, diff --git a/tests/acceptance/provisioner_test.go b/tests/acceptance/provisioner_test.go index c7d938578..cd0bc3528 100755 --- a/tests/acceptance/provisioner_test.go +++ b/tests/acceptance/provisioner_test.go @@ -60,6 +60,7 @@ func TestProvisioner(t *testing.T) { require.Equal(t, principalID, result.PrincipalID) require.Equal(t, acctID, result.AccountID) require.Equal(t, db.Active, result.LeaseStatus) + require.Equal(t, db.LeaseActive, result.LeaseStatusReason) require.NotEqual(t, 0, result.CreatedOn) require.NotEqual(t, 0, result.LastModifiedOn) require.NotEqual(t, 0, result.LastModifiedOn) @@ -73,6 +74,8 @@ func TestProvisioner(t *testing.T) { require.Equal(t, result.AccountID, assgnAfter.AccountID) require.Equal(t, result.LeaseStatus, assgnAfter.LeaseStatus) + require.Equal(t, result.LeaseStatusReason, + assgnAfter.LeaseStatusReason) require.Equal(t, result.CreatedOn, assgnAfter.CreatedOn) require.Equal(t, result.LastModifiedOn, assgnAfter.LastModifiedOn) require.Equal(t, result.LeaseStatusModifiedOn, assgnAfter.LeaseStatusModifiedOn)