Fix tests
This commit is contained in:
parent
35cd56900f
commit
baaeb2c2f1
@ -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), "modules.search")
|
||||||
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.search")
|
helpers.AllowMe(h, types.NamespaceRbacResource(0), "charts.search")
|
||||||
helpers.AllowMe(h, types.NamespaceRbacResource(0), "pages.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.NamespaceRbacResource(0), "read")
|
||||||
helpers.AllowMe(h, types.ModuleRbacResource(0, 0), "read")
|
helpers.AllowMe(h, types.ModuleRbacResource(0, 0), "read")
|
||||||
helpers.AllowMe(h, types.PageRbacResource(0, 0), "read")
|
helpers.AllowMe(h, types.PageRbacResource(0, 0), "read")
|
||||||
|
|||||||
@ -2,6 +2,9 @@ package compose
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/cortezaproject/corteza/server/compose/types"
|
||||||
|
"github.com/cortezaproject/corteza/server/tests/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_namespace_export_automation(t *testing.T) {
|
func Test_namespace_export_automation(t *testing.T) {
|
||||||
@ -12,6 +15,10 @@ func Test_namespace_export_automation(t *testing.T) {
|
|||||||
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
||||||
h.a.NoError(err)
|
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)
|
arch := namespaceExportSafe(t, h, ns.ID)
|
||||||
sessionID := namespaceImportInitSafe(t, h, arch)
|
sessionID := namespaceImportInitSafe(t, h, arch)
|
||||||
ns, _, pp, _ := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
ns, _, pp, _ := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
||||||
|
|||||||
@ -2,6 +2,9 @@ package compose
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/cortezaproject/corteza/server/compose/types"
|
||||||
|
"github.com/cortezaproject/corteza/server/tests/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_namespace_export_empty(t *testing.T) {
|
func Test_namespace_export_empty(t *testing.T) {
|
||||||
@ -12,6 +15,10 @@ func Test_namespace_export_empty(t *testing.T) {
|
|||||||
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
||||||
h.a.NoError(err)
|
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)
|
arch := namespaceExportSafe(t, h, ns.ID)
|
||||||
sessionID := namespaceImportInitSafe(t, h, arch)
|
sessionID := namespaceImportInitSafe(t, h, arch)
|
||||||
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
||||||
|
|||||||
@ -2,6 +2,9 @@ package compose
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/cortezaproject/corteza/server/compose/types"
|
||||||
|
"github.com/cortezaproject/corteza/server/tests/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_namespace_export_simple(t *testing.T) {
|
func Test_namespace_export_simple(t *testing.T) {
|
||||||
@ -12,6 +15,10 @@ func Test_namespace_export_simple(t *testing.T) {
|
|||||||
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
ns, _, _, _, _, err := fetchEntireNamespace(ctx, s, "ns1")
|
||||||
h.a.NoError(err)
|
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)
|
arch := namespaceExportSafe(t, h, ns.ID)
|
||||||
sessionID := namespaceImportInitSafe(t, h, arch)
|
sessionID := namespaceImportInitSafe(t, h, arch)
|
||||||
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
ns, mm, pp, cc := namespaceImportRun(ctx, s, t, h, sessionID, "imported", "imported")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user