Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tjerman authored and Fajfa committed Oct 3, 2024
1 parent 8403444 commit 1ec3224
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/tests/compose/namespace_duplicate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func Test_namespace_duplicate(t *testing.T) {
helpers.AllowMe(h, types.NamespaceRbacResource(0), "modules.search")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.search")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "pages.search")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "modules.export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "read")
helpers.AllowMe(h, types.ModuleRbacResource(0, 0), "read")
helpers.AllowMe(h, types.PageRbacResource(0, 0), "read")
Expand Down
7 changes: 7 additions & 0 deletions server/tests/compose/namespace_export_automation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package compose

import (
"testing"

"github.com/cortezaproject/corteza/server/compose/types"
"github.com/cortezaproject/corteza/server/tests/helpers"
)

func Test_namespace_export_automation(t *testing.T) {
Expand All @@ -12,6 +15,10 @@ func Test_namespace_export_automation(t *testing.T) {
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
h.a.NoError(err)

helpers.AllowMe(h, types.NamespaceRbacResource(0), "export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "modules.export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.export")

arch := namespaceExportSafe(t, h, ns.ID)
sessionID := namespaceImportInitSafe(t, h, arch)
ns, _, pp, _ := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
Expand Down
7 changes: 7 additions & 0 deletions server/tests/compose/namespace_export_empty_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package compose

import (
"testing"

"github.com/cortezaproject/corteza/server/compose/types"
"github.com/cortezaproject/corteza/server/tests/helpers"
)

func Test_namespace_export_empty(t *testing.T) {
Expand All @@ -12,6 +15,10 @@ func Test_namespace_export_empty(t *testing.T) {
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
h.a.NoError(err)

helpers.AllowMe(h, types.NamespaceRbacResource(0), "export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "modules.export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.export")

arch := namespaceExportSafe(t, h, ns.ID)
sessionID := namespaceImportInitSafe(t, h, arch)
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
Expand Down
7 changes: 7 additions & 0 deletions server/tests/compose/namespace_export_simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package compose

import (
"testing"

"github.com/cortezaproject/corteza/server/compose/types"
"github.com/cortezaproject/corteza/server/tests/helpers"
)

func Test_namespace_export_simple(t *testing.T) {
Expand All @@ -12,6 +15,10 @@ func Test_namespace_export_simple(t *testing.T) {
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
h.a.NoError(err)

helpers.AllowMe(h, types.NamespaceRbacResource(0), "export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "modules.export")
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.export")

arch := namespaceExportSafe(t, h, ns.ID)
sessionID := namespaceImportInitSafe(t, h, arch)
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
Expand Down

0 comments on commit 1ec3224

Please sign in to comment.