This file is indexed.

/usr/share/gocode/src/github.com/influxdata/influxdb/stress/v2/stress_client/stressTest_test.go is in golang-github-influxdb-influxdb-dev 1.1.1+dfsg1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package stressClient

import (
	"testing"
	"time"

	influx "github.com/influxdata/influxdb/client/v2"
)

func NewBlankTestPoint() *influx.Point {
	meas := "measurement"
	tags := map[string]string{"fooTag": "fooTagValue"}
	fields := map[string]interface{}{"value": 5920}
	utc, _ := time.LoadLocation("UTC")
	timestamp := time.Date(2016, time.Month(4), 20, 0, 0, 0, 0, utc)
	pt, _ := influx.NewPoint(meas, tags, fields, timestamp)
	return pt
}

func TestStressTestBatcher(t *testing.T) {
	sf, _, _ := NewTestStressTest()
	bpconf := influx.BatchPointsConfig{
		Database:  sf.TestDB,
		Precision: "ns",
	}
	bp, _ := influx.NewBatchPoints(bpconf)
	pt := NewBlankTestPoint()
	bp = sf.batcher(pt, bp)
	if len(bp.Points()) != 1 {
		t.Fail()
	}
}