Skip to content

Commit

Permalink
chore: add restricted module check (#420)
Browse files Browse the repository at this point in the history
Co-authored-by: John Letey <john@noble.xyz>
  • Loading branch information
boojamya and johnletey authored Nov 6, 2024
1 parent ea3adaf commit a805343
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
3 changes: 0 additions & 3 deletions e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import (
)

func TestConformance(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

ctx := context.Background()
Expand Down
39 changes: 39 additions & 0 deletions e2e/module_check_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2024 NASD Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package e2e_test

import (
"context"
"fmt"
"testing"

"github.com/noble-assets/noble/e2e"
"github.com/stretchr/testify/require"
)

func TestRestrictedModules(t *testing.T) {
t.Parallel()

ctx := context.Background()

nw := e2e.NobleSpinUp(t, ctx, false)
noble := nw.Chain.GetNode()

restrictedModules := []string{"circuit", "gov", "group"}

for _, module := range restrictedModules {
require.False(t, noble.HasCommand(ctx, "query", module), fmt.Sprintf("%s is a restricted module", module))
}
}

0 comments on commit a805343

Please sign in to comment.