Fixed upstream merge conflicts

This commit is contained in:
Pierre Tessier 2016-11-04 09:58:17 -04:00
parent f9813ef0a4
commit a9d953de31
3 changed files with 5 additions and 49 deletions

View File

@ -34,11 +34,7 @@ package:
package-wavefront:
./scripts/build.py --package --version="$(VERSION)" --platform=linux --arch=all
<<<<<<< HEAD
=======
>>>>>>> wavefrontHQ/master
# Get dependencies and use gdm to checkout changesets
prepare:
go get github.com/sparrc/gdm

View File

@ -1,8 +1,3 @@
<<<<<<< HEAD
=======
>>>>>>> wavefrontHQ/master
package wavefront
import (
@ -41,12 +36,6 @@ var sanitizedChars = strings.NewReplacer(
// instead of Replacer which may miss some special characters we can use a regex pattern, but this is significantly slower than Replacer
var sanitizedRegex, _ = regexp.Compile("[^a-zA-Z\\d_.-]")
<<<<<<< HEAD
// ensure tag values don't have double quotes inside the value itself
var tagValueReplacer = strings.NewReplacer("\"", "-", "*", "-")
=======
>>>>>>> wavefrontHQ/master
var pathReplacer = strings.NewReplacer("_", "_")
var sampleConfig = `
@ -146,15 +135,9 @@ func buildTags(mTags map[string]string, w *Wavefront) []string {
}
if w.UseRegex {
<<<<<<< HEAD
tags[index] = fmt.Sprintf("%s=\"%s\"", sanitizedRegex.ReplaceAllString(k, "-"), tagValueReplacer.Replace(v))
} else {
tags[index] = fmt.Sprintf("%s=\"%s\"", sanitizedChars.Replace(k), tagValueReplacer.Replace(v))
=======
tags[index] = fmt.Sprintf("%s=\"%s\"", sanitizedRegex.ReplaceAllString(k, "-"), sanitizedRegex.ReplaceAllString(v, "-"))
} else {
tags[index] = fmt.Sprintf("%s=\"%s\"", sanitizedChars.Replace(k), sanitizedChars.Replace(v))
>>>>>>> wavefrontHQ/master
}
index++
@ -255,7 +238,3 @@ func init() {
}
})
}
<<<<<<< HEAD
=======
>>>>>>> wavefrontHQ/master

View File

@ -31,24 +31,16 @@ func TestBuildMetricsNoSimpleFields(t *testing.T) {
pathReplacer = strings.NewReplacer("_", w.MetricSeparator)
testMetric1, _ := telegraf.NewMetric(
<<<<<<< HEAD
"test.simple.metric",
map[string]string{"tag1": "value1"},
map[string]interface{}{"value": 123},
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
)
=======
"test.simple.metric",
map[string]string{"tag1": "value1"},
map[string]interface{}{"value": 123},
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
)
>>>>>>> wavefrontHQ/master
var metricTests = []struct {
metric telegraf.Metric
metric telegraf.Metric
metricLines []MetricLine
} {
}{
{
testutil.TestMetric(float64(1.0), "testing_just*a%metric:float"),
[]MetricLine{{Metric: w.Prefix + "testing.just-a-metric-float", Value: "1.000000"}},
@ -79,24 +71,16 @@ func TestBuildMetricsWithSimpleFields(t *testing.T) {
pathReplacer = strings.NewReplacer("_", w.MetricSeparator)
testMetric1, _ := telegraf.NewMetric(
<<<<<<< HEAD
"test.simple.metric",
map[string]string{"tag1": "value1"},
map[string]interface{}{"value": 123},
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
)
=======
"test.simple.metric",
map[string]string{"tag1": "value1"},
map[string]interface{}{"value": 123},
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
)
>>>>>>> wavefrontHQ/master
var metricTests = []struct {
metric telegraf.Metric
metric telegraf.Metric
metricLines []MetricLine
} {
}{
{
testutil.TestMetric(float64(1.0), "testing_just*a%metric:float"),
[]MetricLine{{Metric: w.Prefix + "testing.just-a-metric-float.value", Value: "1.000000"}},
@ -195,8 +179,5 @@ func TestBuildTags(t *testing.T) {
// err = w.Write(metrics)
// require.NoError(t, err)
<<<<<<< HEAD
// }
=======
// }
>>>>>>> wavefrontHQ/master