func Configure(cfg Configuration) error {
	api = cfg.API
	uapi = cfg.UnauthorizedAPI
	product = cfg.Product
	region = cfg.Region
	plan = cfg.Plan
	planFeatures = cfg.PlanFeatures
	newPlan = cfg.NewPlan
	newPlanFeatures = cfg.NewPlanFeatures
	credentialType = cfg.Credential
	clientID = cfg.ClientID
	clientSecret = cfg.ClientSecret
	connectorPort = cfg.Port
	var err error
	if cfg.CallbackTimeout != "" {
		cbTimeout, err = time.ParseDuration(cfg.CallbackTimeout)
		if err != nil {
			return err
		}
		if cbTimeout > maxTimeout {
			return errors.New("callback timeout cannot exceed 24hrs")
		}
	}
	if cfg.ResourceMeasures != "" {
		err := json.Unmarshal([]byte(cfg.ResourceMeasures), &resourceMeasures)
		if err != nil {
			return errors.Wrap(err, "failed to parse resource measures json")
		}
	}
	fakeConnector, err = connector.New(connectorPort, clientID, clientSecret, product)
	return err
}
Configure configures all the values needed to run the acceptance tests.
This should be called before run.
package acceptance
import (
	"context"
	"encoding/json"
	"fmt"
	"time"
	"github.com/pkg/errors"
	"github.com/onsi/gomega"
	"github.com/urfave/cli/v2"
	manifold "github.com/manifoldco/go-manifold"
	"github.com/manifoldco/grafton"
	"github.com/manifoldco/grafton/connector"
)
var api *grafton.Client
var uapi *grafton.Client
var product string
var plan string
var planFeatures manifold.FeatureMap
var region string
var newPlan string
var newPlanFeatures manifold.FeatureMap
var resourceMeasures map[string]int64
var credentialType string
var clientID string
var clientSecret string
var connectorPort uint
var fakeConnector *connector.FakeConnector
var cbTimeout = time.Minute * 5
var maxTimeout = 24 * time.Hour
type visitorFunc func(context.Context, *FeatureImpl) bool
type Configuration struct {
	API              *grafton.Client
	UnauthorizedAPI  *grafton.Client
	Product          string
	Region           string
	Plan             string
	PlanFeatures     manifold.FeatureMap
	NewPlan          string
	NewPlanFeatures  manifold.FeatureMap
	ClientID         string
	ClientSecret     string
	Port             uint
	CallbackTimeout  string
	ResourceMeasures string
	Credential       string
}