github.com/hashicorp/vault/sdk@v0.13.0/framework/testing.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package framework
     5  
     6  import (
     7  	"testing"
     8  )
     9  
    10  // TestBackendRoutes is a helper to test that all the given routes will
    11  // route properly in the backend.
    12  func TestBackendRoutes(t *testing.T, b *Backend, rs []string) {
    13  	for _, r := range rs {
    14  		if b.Route(r) == nil {
    15  			t.Fatalf("bad route: %s", r)
    16  		}
    17  	}
    18  }