diff --git a/systest/plugin/integration_test.go b/systest/plugin/integration_test.go index 82c4f6d7e77..0a77ea7e101 100644 --- a/systest/plugin/integration_test.go +++ b/systest/plugin/integration_test.go @@ -25,7 +25,6 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/dgraph-io/dgo/v230/protos/api" "github.com/dgraph-io/dgraph/dgraphtest" "github.com/dgraph-io/dgraph/x" ) @@ -43,11 +42,11 @@ func (psuite *PluginTestSuite) SetupTest() { func (psuite *PluginTestSuite) TearDownTest() { t := psuite.T() gcli, cleanup, err := psuite.dc.Client() - defer cleanup() require.NoError(t, err) + defer cleanup() require.NoError(t, gcli.LoginIntoNamespace(context.Background(), dgraphtest.DefaultUser, dgraphtest.DefaultPassword, x.GalaxyNamespace)) - require.NoError(t, gcli.Alter(context.Background(), &api.Operation{DropAll: true})) + require.NoError(t, gcli.DropAll()) } func (psuite *PluginTestSuite) Upgrade() { diff --git a/systest/plugin/plugin_test.go b/systest/plugin/plugin_test.go index bf140880524..489f56b143e 100644 --- a/systest/plugin/plugin_test.go +++ b/systest/plugin/plugin_test.go @@ -1,4 +1,4 @@ -//go:build (!oss && integration) || upgrade +//go:build integration || upgrade /* * Copyright 2017-2023 Dgraph Labs, Inc. and Contributors @@ -30,11 +30,12 @@ import ( "github.com/dgraph-io/dgraph/x" ) - +/* type testCase struct { query string wantResult string } +*/ type PluginFuncInp struct { initialSchema string @@ -322,13 +323,11 @@ func (psuite *PluginTestSuite) TestPlugins() { defer cancel() gcli, cleanup, err := psuite.dc.Client() - defer cleanup() require.NoError(t, err) + defer cleanup() require.NoError(t, gcli.LoginIntoNamespace(context.Background(), dgraphtest.DefaultUser, dgraphtest.DefaultPassword, x.GalaxyNamespace)) - require.NoError(t, gcli.Alter(ctx, &api.Operation{ - DropAll: true, - })) + require.NoError(t, gcli.DropAll()) require.NoError(t, gcli.Alter(ctx, &api.Operation{ Schema: initialSchema, })) diff --git a/systest/plugin/upgrade_test.go b/systest/plugin/upgrade_test.go index 5e75a2583c1..7086f40a56c 100644 --- a/systest/plugin/upgrade_test.go +++ b/systest/plugin/upgrade_test.go @@ -63,15 +63,8 @@ func (psuite *PluginTestSuite) Upgrade() { } } -// For testing purpose -var comboEntry = []dgraphtest.UpgradeCombo{ - {"v21.03.0", "v23.0.0", dgraphtest.BackupRestore}, -} - func TestPluginTestSuite(t *testing.T) { - //for _, uc := range dgraphtest.AllUpgradeCombos { - //} - for _, uc := range comboEntry { + for _, uc := range dgraphtest.AllUpgradeCombos { log.Printf("running: backup in [%v], restore in [%v]", uc.Before, uc.After) var psuite PluginTestSuite psuite.uc = uc