Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinalirao committed Aug 14, 2023
1 parent 7533efc commit 7f022ef
Show file tree
Hide file tree
Showing 5 changed files with 347 additions and 739 deletions.
20 changes: 15 additions & 5 deletions policy_evaluation_beta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ import (
)

func TestPolicyEvaluationList_Beta(t *testing.T) {
skipUnlessBeta(t)
//skipUnlessBeta(t)

Check failure on line 15 in policy_evaluation_beta_test.go

View workflow job for this annotation

GitHub Actions / Lint

commentFormatting: put a space between `//` and comment text (gocritic)

client := testClient(t)
ctx := context.Background()

orgTest, orgTestCleanup := createOrganization(t, client)
defer orgTestCleanup()

upgradeOrganizationSubscription(t, client, orgTest)

wkspaceTest, wkspaceTestCleanup := createWorkspace(t, client, orgTest)
defer wkspaceTestCleanup()

Expand Down Expand Up @@ -67,14 +69,16 @@ func TestPolicyEvaluationList_Beta(t *testing.T) {
}

func TestPolicySetOutcomeList_Beta(t *testing.T) {
skipUnlessBeta(t)
//skipUnlessBeta(t)

Check failure on line 72 in policy_evaluation_beta_test.go

View workflow job for this annotation

GitHub Actions / Lint

commentFormatting: put a space between `//` and comment text (gocritic)

client := testClient(t)
ctx := context.Background()

orgTest, orgTestCleanup := createOrganization(t, client)
defer orgTestCleanup()

upgradeOrganizationSubscription(t, client, orgTest)

wkspaceTest, wkspaceTestCleanup := createWorkspace(t, client, orgTest)
defer wkspaceTestCleanup()

Expand Down Expand Up @@ -178,14 +182,16 @@ func TestPolicySetOutcomeList_Beta(t *testing.T) {
}

func TestPolicySetOutcomeRead_Beta(t *testing.T) {
skipUnlessBeta(t)
//skipUnlessBeta(t)

Check failure on line 185 in policy_evaluation_beta_test.go

View workflow job for this annotation

GitHub Actions / Lint

commentFormatting: put a space between `//` and comment text (gocritic)

client := testClient(t)
ctx := context.Background()

orgTest, orgTestCleanup := createOrganization(t, client)
defer orgTestCleanup()

upgradeOrganizationSubscription(t, client, orgTest)

wkspaceTest, wkspaceTestCleanup := createWorkspace(t, client, orgTest)
defer wkspaceTestCleanup()

Expand All @@ -203,10 +209,14 @@ func TestPolicySetOutcomeRead_Beta(t *testing.T) {
defer policyTestCleanup()

policySet := []*Policy{policyTest}
_, psTestCleanup1 := createPolicySet(t, client, orgTest, policySet, []*Workspace{wkspaceTest}, nil, OPA)
policySetOpts := PolicySetCreateOptions{
Kind: OPA,
Overridable: Bool(true),
}
_, psTestCleanup1 := createPolicySetWithOptions(t, client, orgTest, policySet, []*Workspace{wkspaceTest}, policySetOpts)
defer psTestCleanup1()

rTest, rTestCleanup := createPlannedRun(t, client, wkspaceTest)
rTest, rTestCleanup := createRunWaitForStatus(t, client, wkspaceTest, RunPostPlanAwaitingDecision)
defer rTestCleanup()

t.Run("with a valid policy set outcome ID", func(t *testing.T) {
Expand Down
Loading

0 comments on commit 7f022ef

Please sign in to comment.