diff --git a/tests/integration/acp/demo/demo_test.go b/tests/integration/acp/demo/demo_test.go deleted file mode 100644 index 72269fe596..0000000000 --- a/tests/integration/acp/demo/demo_test.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2024 Democratized Data Foundation -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package test_acp_demo - -import ( - "testing" - - "github.com/sourcenetwork/immutable" - - testUtils "github.com/sourcenetwork/defradb/tests/integration" -) - -func TestACP_DEMO(t *testing.T) { - test := testUtils.TestCase{ - - Description: "DEMO", - - Actions: []any{ - testUtils.AddPolicy{ // Specified and subbed in for User1 and User2 schema below - - Identity: testUtils.ClientIdentity(1), - - Policy: ` - name: test - description: a test policy which marks a collection in a database as a resource - - actor: - name: actor - - resources: - users: - permissions: - read: - expr: owner + reader - write: - expr: owner - - relations: - owner: - types: - - actor - reader: - types: - - actor - admin: - manages: - - reader - types: - - actor - `, - - // TODO: Remove after draft is approved - // Note: This is also valid now that it is optional, but we don't need to provide it at all. - ExpectedPolicyID: immutable.Some( - "94eb195c0e459aa79e02a1986c7e731c5015721c18a373f2b2a0ed140a04b454", - ), - }, - - testUtils.AddPolicy{ // Specified and subbed in for User3 schema below - - Identity: testUtils.ClientIdentity(1), - - Policy: ` - name: test - description: another policy - - actor: - name: actor - - resources: - users: - permissions: - read: - expr: owner + reader - write: - expr: owner - - relations: - owner: - types: - - actor - reader: - types: - - actor - admin: - manages: - - reader - types: - - actor - `, - - // TODO: Remove after draft is approved - // Note: No policyID assertion needed - }, - - testUtils.SchemaUpdate{ - Schema: ` - type Users1 @policy( - id: "{{.Policy0}}", - resource: "users" - ) { - name: String - age: Int - } - - type User2 @policy( - id: "{{.Policy0}}", - resource: "users" - ) { - name: String - age: Int - } - - type User3 @policy( - id: "{{.Policy1}}", - resource: "users" - ) { - name: String - age: Int - } - `, - - Replace: map[string]testUtils.ReplaceType{ - "Policy0": testUtils.NewPolicyIndex(0), - "Policy1": testUtils.NewPolicyIndex(1), - }, - }, - }, - } - - testUtils.ExecuteTestCase(t, test) -}