Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Gromov committed Sep 12, 2017
1 parent da86f13 commit c3eced2
Showing 1 changed file with 0 additions and 113 deletions.
113 changes: 0 additions & 113 deletions rules/ruleset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,119 +43,6 @@ var (
compressedMean, _ = compressor.Compress(policy.AggregationTypes{policy.Mean})
compressedP999, _ = compressor.Compress(policy.AggregationTypes{policy.P999})
compressedCountAndMean, _ = compressor.Compress(policy.AggregationTypes{policy.Count, policy.Mean})

marshalTestSchema = &schema.RuleSet{
Uuid: "ruleset",
Namespace: "namespace",
CreatedAt: 1234,
LastUpdatedAt: 5678,
Tombstoned: false,
CutoverTime: 34923,
MappingRules: []*schema.MappingRule{
&schema.MappingRule{
Uuid: "12669817-13ae-40e6-ba2f-33087b262c68",
Snapshots: []*schema.MappingRuleSnapshot{
&schema.MappingRuleSnapshot{
Name: "foo",
Tombstoned: false,
CutoverTime: 12345,
TagFilters: map[string]string{
"tag1": "value1",
"tag2": "value2",
},
Policies: []*schema.Policy{
&schema.Policy{
StoragePolicy: &schema.StoragePolicy{
Resolution: &schema.Resolution{
WindowSize: int64(10 * time.Second),
Precision: int64(time.Second),
},
Retention: &schema.Retention{
Period: int64(24 * time.Hour),
},
},
AggregationTypes: []schema.AggregationType{
schema.AggregationType_P999,
},
},
},
},
},
},
},
RollupRules: []*schema.RollupRule{
&schema.RollupRule{
Uuid: "12669817-13ae-40e6-ba2f-33087b262c69",
Snapshots: []*schema.RollupRuleSnapshot{
&schema.RollupRuleSnapshot{
Name: "bar",
Tombstoned: false,
CutoverTime: 12345,
TagFilters: map[string]string{
"tag1": "value1",
"tag2": "value2",
},
Targets: []*schema.RollupTarget{
&schema.RollupTarget{
Name: "test",
Tags: []string{"foo", "bar"},
Policies: []*schema.Policy{
&schema.Policy{
StoragePolicy: &schema.StoragePolicy{
Resolution: &schema.Resolution{
WindowSize: int64(10 * time.Second),
Precision: int64(time.Second),
},
Retention: &schema.Retention{
Period: int64(24 * time.Hour),
},
},
AggregationTypes: []schema.AggregationType{
schema.AggregationType_P999,
},
},
},
},
},
},
},
},
},
}

marshalTestString = `
{"uuid":"ruleset",
"version":1,
"namespace":"namespace",
"createdAt":1234,
"lastUpdatedAt":5678,
"tombstoned":false,
"cutoverNanos":34923,
"mappingRules":[{
"uuid":"12669817-13ae-40e6-ba2f-33087b262c68",
"snapshots":[{
"name":"foo",
"tombstoned":false,
"cutoverNanos":12345,
"filters":{"tag1":"value1","tag2":"value2"},
"policies":["10s@1s:24h0m0s|P999"]
}]
}],
"rollupRules":[{
"uuid":"12669817-13ae-40e6-ba2f-33087b262c69",
"snapshots":[{
"name":"bar",
"tombstoned":false,
"cutoverNanos":12345,
"filters":{"tag1":"value1","tag2":"value2"},
"targets":[{
"name":"test",
"tags":["bar","foo"],
"policies":["10s@1s:24h0m0s|P999"]
}]
}]
}]
}`
)

func TestMatchModeUnmarshalYAML(t *testing.T) {
Expand Down

0 comments on commit c3eced2

Please sign in to comment.