You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: config_test.go
    path of file: ./repos/gocryptotrader/config
    
    the code of the file until where you have to start completion: package config

import (
	"errors"
	"os"
	"path/filepath"
	"runtime"
	"strings"
	"testing"
	"time"

	"github.com/thrasher-corp/gocryptotrader/common"
	"github.com/thrasher-corp/gocryptotrader/common/convert"
	"github.com/thrasher-corp/gocryptotrader/common/file"
	"github.com/thrasher-corp/gocryptotrader/communications/base"
	"github.com/thrasher-corp/gocryptotrader/connchecker"
	"github.com/thrasher-corp/gocryptotrader/currency"
	"github.com/thrasher-corp/gocryptotrader/database"
	"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
	gctscript "github.com/thrasher-corp/gocryptotrader/gctscript/vm"
	"github.com/thrasher-corp/gocryptotrader/log"
	"github.com/thrasher-corp/gocryptotrader/portfolio/banking"
)

const (
	testFakeExchangeName = "Stampbit"
	testPair             = "BTC-USD"
	testString           = "test"
	bfx                  = "Bitfinex"
)

func TestGetNonExistentDefaultFilePathDoesNotCrea
    
func TestCheckPairConsistency(t *testing.T) {
	t.Parallel()

	var c Config
	err := c.CheckPairConsistency("asdf")
	if !errors.Is(err, ErrExchangeNotFound) {
		t.Fatalf("received: '%v' buy expected: '%v'", err, ErrExchangeNotFound)
	}

	c.Exchanges = append(c.Exchanges,
		Exchange{
			Name: testFakeExchangeName,
		},
	)

	// Test nil pair store
	err = c.CheckPairConsistency(testFakeExchangeName)
	if !errors.Is(err, errPairsManagerIsNil) {
		t.Fatalf("received: '%v' buy expected: '%v'", err, errPairsManagerIsNil)
	}

	enabled, err := currency.NewPairDelimiter("BTC_USD", "_")
	if err != nil {
		t.Fatal(err)
	}

	c.Exchanges[0].CurrencyPairs = &currency.PairsManager{
		Pairs: map[asset.Item]*currency.PairStore{
			asset.Spot: {
				RequestFormat: &currency.PairFormat{
					Uppercase: false,
					Delimiter: "_",
				},
				ConfigFormat: &currency.PairFormat{
					Uppercase: true,
					Delimiter: "_",
				},
				Enabled: currency.Pairs{
					enabled,
				},
			},
		},
	}

	// Test for nil avail pairs
	err = c.CheckPairConsistency(testFakeExchangeName)
	if !errors.Is(err, nil) {
		t.Fatalf("received: '%v' buy expected: '%v'", err, nil)
	}

	p1, err := currency.NewPairDelimiter("LTC_USD", "_")
	if err != nil {
		t.Fatal(err)
	}

	// Test that enabled pair is not found in the available pairs
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Available = currency.Pairs{
		p1,
	}

	// LTC_USD is only found in the available pairs list and should therefore
	// be added to the enabled pairs list due to the atLestOneEnabled code
	err = c.CheckPairConsistency(testFakeExchangeName)
	if err != nil {
		t.Fatal(err)
	}

	if len(c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled) != 1 {
		t.Fatal("there should be at least one pair located in this list")
	}

	if !c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled[0].Equal(p1) {
		t.Fatal("LTC_USD should be contained in the enabled pairs list")
	}

	p2, err := currency.NewPairDelimiter("BTC_USD", "_")
	if err != nil {
		t.Fatal(err)
	}

	// Add the BTC_USD pair and see result
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Available = currency.Pairs{
		p1, p2,
	}

	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Fatal(err)
	}

	// Test that an empty enabled pair is populated with an available pair
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = nil
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result", err)
	}

	if len(c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled) != 1 {
		t.Fatal("should be populated with at least one currency pair")
	}

	// Test that an invalid enabled pair is removed from the list
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{
		p1,
		p2,
	}
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	// Test when no update is required as the available pairs and enabled pairs
	// are consistent
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(true)
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{}

	// Test no conflict and at least one on enabled asset type
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(true)
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{currency.NewPair(currency.DASH, currency.USD)}

	// Test with conflict and at least one on enabled asset type
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(false)
	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{}

	// Test no conflict and at least one on disabled asset type
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{
		currency.NewPair(currency.DASH, currency.USD),
		p1,
		p2,
	}

	// Test with conflict and at least one on disabled asset type
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}

	c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = nil

	// assetType enabled failure check
	if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
		t.Error("unexpected result")
	}
}