func TestTableManager_cache(t *testing.T) {
	p := newPostgresqlTest(t)
	p.TagsAsForeignKeys = true
	require.NoError(t, p.Connect())

	metrics := []telegraf.Metric{
		newMetric(t, "", MSS{"tag": "foo"}, MSI{"a": 1}),
	}
	tsrc := NewTableSources(p.Postgresql, metrics)[t.Name()]

	require.NoError(t, p.tableManager.MatchSource(ctx, p.db, tsrc))
}
// verify that TableManager updates & caches the DB table structure unless the incoming metric can't fit.
verify that TableManager updates & caches the DB table structure unless the incoming metric can't fit.
// verify that TableManager updates & caches the DB table structure unless the incoming metric can ' t fit .
func TestTableManager_cache(t *testing.T) {
	p := newPostgresqlTest(t)
	p.TagsAsForeignKeys = true
	require.NoError(t, p.Connect())
	metrics := []telegraf.Metric{
		newMetric(t, "", MSS{"tag": "foo"}, MSI{"a": 1}),
	}
	tsrc := NewTableSources(p.Postgresql, metrics)[t.Name()]
	require.NoError(t, p.tableManager.MatchSource(ctx, p.db, tsrc))
}
func TestTableManager_cache ( t * testing . T ) { p := newPostgresqlTest ( t ) p . TagsAsForeignKeys = true require . NoError ( t , p . Connect ( ) ) metrics := [ ] telegraf . Metric { newMetric ( t , " " , MSS { " " : " " } , MSI { " " : 1 } ) , } tsrc := NewTableSources ( p . Postgresql , metrics ) [ t . Name ( ) ] require . NoError ( t , p . tableManager . MatchSource ( ctx , p . db , tsrc ) ) }
verify that TableManager updates & caches the DB table structure unless the incoming metric can't fit.
verify that TableManager updates & caches the DB table structure unless the incoming metric can ' t fit .