<commit_before>package kv_test

import (
	"context"
	"testing"

	"github.com/influxdata/influxdb/v2"
	"github.com/influxdata/influxdb/v2/inmem"
	"github.com/influxdata/influxdb/v2/kv"
	"github.com/influxdata/influxdb/v2/snowflake"
	influxdbtesting "github.com/influxdata/influxdb/v2/testing"
	"go.uber.org/zap/zaptest"
)

type testable interface {
	Helper()
	Logf(string, ...interface{})
	Error(args ...interface{})
	Errorf(string, ...interface{})
	Fail()
	Failed() bool
	Name() string
	FailNow()
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
}

func TestBoltUserResourceMappingService(t *testing.T) {
	influxdbtesting.UserResourceMappingService(initURMServiceFunc(NewTestBoltStore), t)
}

func TestInmemUserResourceMappingService(t *testing.T) {
	influxdbtesting.UserResourceMappingService(initURMServiceFunc(NewTestBoltStore), t)
}

type userResourceMappingTestFunc func(influxdbtesting.UserResourceFields, *testing.T) (influxdb.UserResourceMappingService, func())

func initURMServiceFunc(storeFn func(*testing.T) (kv.SchemaStore, func(), error), confs ...kv.ServiceConfig) userResourceMappingTestFunc {
	return func(f influxdbtesting.UserResourceFields, t *testing.T) (influxdb.UserResourceMappingService, func()) {<commit_msg>fix(kv): Really use inmem store for in memory URM tests<commit_after>package kv_test

import (
	"context"
	"testing"

	"github.com/influxdata/influxdb/v2"
	"github.com/influxdata/influxdb/v2/inmem"
	"github.com/influxdata/influxdb/v2/kv"
	"github.com/influxdata/influxdb/v2/snowflake"
	influxdbtesting "github.com/influxdata/influxdb/v2/testing"
	"go.uber.org/zap/zaptest"
)

type testable interface {
	Helper()
	Logf(string, ...interface{})
	Error(args ...interface{})
	Errorf(string, ...interface{})
	Fail()
	Failed() bool
	Name() string
	FailNow()
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
}

func TestBoltUserResourceMappingService(t *testing.T) {
	influxdbtesting.UserResourceMappingService(initURMServiceFunc(NewTestBoltStore), t)
}

func TestInmemUserResourceMappingService(t *testing.T) {
	influxdbtesting.UserResourceMappingService(initURMServiceFunc(NewTestInmemStore), t)
}

type userResourceMappingTestFunc func(influxdbtesting.UserResourceFields, *testing.T) (influxdb.UserResourceMappingService, func())

func initURMServiceFunc(storeFn func(*testing.T) (kv.SchemaStore, func(), error), confs ...kv.ServiceConfig) userResourceMappingTestFunc {
	return func(f influxdbtesting.UserResourceFields, t *testing.T) (influxdb.UserResourceMappingService, func()) {
{'fraction_non_alphanumeric': 0.13179507235041063, 'fraction_numerical': 0.003910833007430583, 'mean_word_length': 6.658682634730539, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6460208', 'n_tokens_mistral': 881, 'n_tokens_neox': 876, 'n_words': 141}