diff --git a/upload/config.go b/upload/config.go index e1ffc633..a7b88dc2 100644 --- a/upload/config.go +++ b/upload/config.go @@ -72,11 +72,11 @@ func (s *StorageType) UnmarshalJSON(b []byte) error { // Config is the config file format for the upload service type Config struct { - Version int `json:"version"` - Type StorageType `json:"type"` - Compress bool `json:"compress,omitempty"` - Interval Duration `json:"interval"` - Sub json.RawMessage `json:"sub"` + Version int `json:"version"` + Type StorageType `json:"type"` + NoCompress bool `json:"no_compress,omitempty"` + Interval Duration `json:"interval"` + Sub json.RawMessage `json:"sub"` } // S3Config is the subconfig for the S3 storage type diff --git a/upload/config_test.go b/upload/config_test.go index 83b3bb23..996b2d2c 100644 --- a/upload/config_test.go +++ b/upload/config_test.go @@ -21,7 +21,7 @@ func TestUnmarshal(t *testing.T) { { "version": 1, "type": "s3", - "compress": true, + "no_compress": true, "interval": "24h", "sub": { "access_key_id": "test_id", @@ -33,10 +33,10 @@ func TestUnmarshal(t *testing.T) { } `), expectedCfg: &Config{ - Version: 1, - Type: "s3", - Compress: true, - Interval: 24 * Duration(time.Hour), + Version: 1, + Type: "s3", + NoCompress: true, + Interval: 24 * Duration(time.Hour), }, expectedS3: &S3Config{ AccessKeyID: "test_id", @@ -53,7 +53,7 @@ func TestUnmarshal(t *testing.T) { { "version": 2, "type": "s3", - "compress": true, + "no_compress": false, "interval": "24h", "sub": { "access_key_id": "test_id", @@ -73,7 +73,7 @@ func TestUnmarshal(t *testing.T) { { "version": 1, "type": "unsupported", - "compress": true, + "no_compress": true, "interval": "24h", "sub": { "access_key_id": "test_id", @@ -117,6 +117,6 @@ func compareConfig(a, b *Config) bool { } return a.Version == b.Version && a.Type == b.Type && - a.Compress == b.Compress && + a.NoCompress == b.NoCompress && a.Interval == b.Interval }