fluent-plugin-azure-storage-append-blob-lts 0.3.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 335e03eeafd0648547d44b98ce7bbbc3dd8a780dc03d3e39a17005a8305c0ba1
4
- data.tar.gz: e1361ff0a6cc0d95eec72e2b330861de638afd17601a3ba2d6f81d0a18d7ee9a
3
+ metadata.gz: 24eb19ac68cd42369ff7f147be24635945aad7c003f4ed789bcb4189d5f9a96e
4
+ data.tar.gz: f293437b177cf4f7fc7a02694150f03f479c70749a3973d2ffc45a19377b7784
5
5
  SHA512:
6
- metadata.gz: b2c40956a6eb51ea8a0d19058527fe8c470d48dbf59130671322c99c073353ffb4b9a0f931afcf7707dbc3deda7d44974174214e3045f7d566da876b7f434e93
7
- data.tar.gz: 31258dfaf599e2bcfdda8c268aef6295b9720407c93a8b8997376ef192b7024fe15639da751be765c43e562738ad7f50daf479055f9668ef3cd7748e41173dd2
6
+ metadata.gz: 7be9b8cf563a7c2cf5b10667a8d037ea5a17d84a78ab3a782a937f5c06e0f850804985fef3b5b6eff795e965c4eefa0d690ddd737485929fa4882df416e420c0
7
+ data.tar.gz: d4bb668e69155459e1b69ce954f9b8434a9dfa5e92dbf5e1324e9a1d50514c2e7b6b34e513f5fcb3621f5ba7b2b2dee5d7dea1cf37788ffe198869f5d7a3a0a4
@@ -0,0 +1 @@
1
+ * @elsesiy
@@ -11,14 +11,12 @@ jobs:
11
11
  build:
12
12
  name: Build + Publish
13
13
  runs-on: ubuntu-latest
14
-
15
14
  steps:
16
15
  - uses: actions/checkout@v2
17
16
  - name: Set up Ruby 2.6
18
17
  uses: actions/setup-ruby@v1
19
18
  with:
20
19
  ruby-version: 2.6.x
21
-
22
20
  - name: Publish to RubyGems
23
21
  run: |
24
22
  mkdir -p $HOME/.gem
@@ -8,9 +8,7 @@ on:
8
8
 
9
9
  jobs:
10
10
  test:
11
-
12
11
  runs-on: ubuntu-latest
13
-
14
12
  steps:
15
13
  - uses: actions/checkout@v2
16
14
  - name: Set up Ruby
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM ruby:latest
1
+ FROM ruby:2.7
2
2
 
3
3
  WORKDIR /plugin
4
4
 
5
- ADD . /plugin
5
+ COPY . /plugin
6
6
 
7
7
  RUN gem install bundler && \
8
8
  gem install fluentd --no-doc && \
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # fluent-plugin-azure-storage-append-blob-lts
2
2
 
3
+ ![Tests](https://github.com/elsesiy/fluent-plugin-azure-storage-append-blob-lts/workflows/Test/badge.svg?branch=master)
4
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-azure-storage-append-blob-lts.svg)](https://badge.fury.io/rb/fluent-plugin-azure-storage-append-blob-lts)
5
+ [![Twitter](https://img.shields.io/badge/twitter-@elsesiy-blue.svg)](http://twitter.com/elsesiy)
6
+
3
7
  Azure Storage Append Blob output plugin buffers logs in local file and uploads them to Azure Storage Append Blob periodically.
4
8
  This plugin is a fork of [microsoft/fluent-plugin-azure-storage-append-blob](https://github.com/microsoft/fluent-plugin-azure-storage-append-blob) which is not actively maintained.
5
9
 
@@ -24,6 +28,7 @@ And then execute:
24
28
  <match pattern>
25
29
  type azure-storage-append-blob
26
30
 
31
+ azure_cloud <azure cloud environment>
27
32
  azure_storage_account <your azure storage account>
28
33
  azure_storage_access_key <your azure storage access key> # leave empty to use MSI
29
34
  azure_storage_connection_string <your azure storage connection string> # leave empty to use MSI
@@ -31,10 +36,12 @@ And then execute:
31
36
  azure_imds_api_version <Azure Instance Metadata Service API Version> # only used for MSI
32
37
  azure_token_refresh_interval <refresh interval in min> # only used for MSI
33
38
  azure_container <your azure storage container>
39
+ azure_msi_client_id <Azure Managed Identity Client ID> # only used for MSI
34
40
  auto_create_container true
35
41
  path logs/
36
42
  azure_object_key_format %{path}%{time_slice}_%{index}.log
37
43
  time_slice_format %Y%m%d-%H
44
+ compute_checksums true
38
45
  # if you want to use %{tag} or %Y/%m/%d/ like syntax in path / azure_blob_name_format,
39
46
  # need to specify tag for %{tag} and time for %Y/%m/%d in <buffer> argument.
40
47
  <buffer tag,time>
@@ -46,6 +53,12 @@ And then execute:
46
53
  </buffer>
47
54
  </match>
48
55
 
56
+ ### `azure_cloud` (Optional)
57
+
58
+ Default: `AZUREPUBLICCLOUD`
59
+
60
+ Cloud environment used to determine the storage endpoint suffix to use, see [here](https://github.com/Azure/go-autorest/blob/master/autorest/azure/environments.go).
61
+
49
62
  ### `azure_storage_account` (Required)
50
63
 
51
64
  Your Azure Storage Account Name. This can be retrieved from Azure Management portal.
@@ -59,7 +72,7 @@ If all are empty, the plugin will use the local Managed Identity endpoint to obt
59
72
 
60
73
  ### `azure_imds_api_version` (Optional, only for MSI)
61
74
 
62
- Default: 2019-08-15
75
+ Default: `2019-08-15`
63
76
 
64
77
  The Instance Metadata Service is used during the OAuth flow to obtain an access token. This API is versioned and specifying the version is mandatory.
65
78
 
@@ -67,7 +80,7 @@ See [here](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instanc
67
80
 
68
81
  ### `azure_token_refresh_interval` (Optional, only for MSI)
69
82
 
70
- Default: 60 (1 hour)
83
+ Default: `60` (1 hour)
71
84
 
72
85
  When using MSI, the initial access token needs to be refreshed periodically.
73
86
 
@@ -75,10 +88,15 @@ When using MSI, the initial access token needs to be refreshed periodically.
75
88
 
76
89
  Azure Storage Container name
77
90
 
91
+ ### `azure_msi_client_id` (Optional, only for MSI)
92
+
93
+ Azure Identity Client ID to use for accessing Azure Blob service.
94
+
78
95
  ### `auto_create_container`
79
96
 
97
+ Default: `true`
98
+
80
99
  This plugin creates the Azure container if it does not already exist exist when you set 'auto_create_container' to true.
81
- The default value is `true`
82
100
 
83
101
  ### `azure_object_key_format`
84
102
 
@@ -122,6 +140,14 @@ The [fluent-mixin-config-placeholders](https://github.com/tagomoris/fluent-mixin
122
140
 
123
141
  Format of the time used in the file name. Default is '%Y%m%d'. Use '%Y%m%d%H' to split files hourly.
124
142
 
143
+ ### `compute_checksums`
144
+
145
+ Default: `true`
146
+
147
+ Whether to compute MD5 checksum of the blob contents during append operation and provide it in a header for the blob service.
148
+
149
+ You want to set it to `false` in FIPS-enabled environments.
150
+
125
151
  ### Run tests
126
152
 
127
153
  gem install bundler
@@ -3,12 +3,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'fluent-plugin-azure-storage-append-blob-lts'
6
- spec.version = '0.3.0'
6
+ spec.version = '0.6.2'
7
7
  spec.authors = ['Jonas-Taha El Sesiy']
8
- spec.email = ['']
8
+ spec.email = ['github@elsesiy.com']
9
9
 
10
10
  spec.summary = 'Azure Storage Append Blob output plugin for Fluentd event collector'
11
- spec.description = 'Fluentd plugin to upload logs to Azure Storage append blobs. Fork of https://github.com/elsesiy/fluent-plugin-azure-storage-append-blob'
11
+ spec.description = 'Fluentd plugin to upload logs to Azure Storage append blobs. Fork of https://github.com/microsoft/fluent-plugin-azure-storage-append-blob'
12
12
  spec.homepage = 'https://github.com/elsesiy/fluent-plugin-azure-storage-append-blob-lts'
13
13
  spec.license = 'MIT'
14
14
 
@@ -11,7 +11,7 @@ require 'json'
11
11
 
12
12
  module Fluent
13
13
  module Plugin
14
- class AzureStorageAppendBlobOut < Fluent::Plugin::Output
14
+ class AzureStorageAppendBlobOut < Output
15
15
  Fluent::Plugin.register_output('azure-storage-append-blob', self)
16
16
 
17
17
  helpers :formatter, :inject
@@ -19,17 +19,32 @@ module Fluent
19
19
  DEFAULT_FORMAT_TYPE = 'out_file'.freeze
20
20
  AZURE_BLOCK_SIZE_LIMIT = 4 * 1024 * 1024 - 1
21
21
 
22
+ def initialize
23
+ super
24
+ @use_msi = false
25
+
26
+ # Storage endpoint suffixes for various environments, see https://github.com/Azure/go-autorest/blob/master/autorest/azure/environments.go
27
+ @storage_endpoint_mapping = {
28
+ 'AZURECHINACLOUD' => 'core.chinacloudapi.cn',
29
+ 'AZUREGERMANCLOUD' => 'core.cloudapi.de',
30
+ 'AZUREPUBLICCLOUD' => 'core.windows.net',
31
+ 'AZUREUSGOVERNMENTCLOUD' => 'core.usgovcloudapi.net'
32
+ }
33
+ end
34
+
22
35
  config_param :path, :string, default: ''
23
36
  config_param :azure_storage_account, :string, default: nil
24
37
  config_param :azure_storage_access_key, :string, default: nil, secret: true
25
- config_param :azure_storage_sas_token, :string, default: nil, secret: true
26
38
  config_param :azure_storage_connection_string, :string, default: nil, secret: true
39
+ config_param :azure_storage_sas_token, :string, default: nil, secret: true
40
+ config_param :azure_cloud, :string, default: 'AZUREPUBLICCLOUD'
41
+ config_param :azure_msi_client_id, :string, default: nil
27
42
  config_param :azure_container, :string, default: nil
28
43
  config_param :azure_imds_api_version, :string, default: '2019-08-15'
29
44
  config_param :azure_token_refresh_interval, :integer, default: 60
30
- config_param :use_msi, :bool, default: false
31
45
  config_param :azure_object_key_format, :string, default: '%{path}%{time_slice}-%{index}.log'
32
46
  config_param :auto_create_container, :bool, default: true
47
+ config_param :compute_checksums, :bool, default: true
33
48
  config_param :format, :string, default: DEFAULT_FORMAT_TYPE
34
49
  config_param :time_slice_format, :string, default: '%Y%m%d'
35
50
  config_param :localtime, :bool, default: false
@@ -60,15 +75,25 @@ module Fluent
60
75
  end
61
76
  end
62
77
 
63
- raise ConfigError, 'azure_storage_account needs to be specified' if @azure_storage_account.nil?
64
-
65
- raise ConfigError, 'azure_container needs to be specified' if @azure_container.nil?
78
+ @azure_storage_dns_suffix = @storage_endpoint_mapping[@azure_cloud]
79
+ if @azure_storage_dns_suffix.nil?
80
+ raise ConfigError 'azure_cloud invalid, must be either of AZURECHINACLOUD, AZUREGERMANCLOUD, AZUREPUBLICCLOUD, AZUREUSGOVERNMENTCLOUD'
81
+ end
66
82
 
67
83
  if (@azure_storage_access_key.nil? || @azure_storage_access_key.empty?) &&
68
84
  (@azure_storage_sas_token.nil? || @azure_storage_sas_token.empty?) &&
69
85
  (@azure_storage_connection_string.nil? || @azure_storage_connection_string.empty?)
70
- log.info 'Using MSI since neither azure_storage_access_key nor azure_storage_sas_token was provided.'
86
+ log.info 'Using MSI since neither of azure_storage_access_key, azure_storage_sas_token, azure_storage_connection_string was provided.'
71
87
  @use_msi = true
88
+ elsif @azure_storage_connection_string.nil? || @azure_storage_connection_string.empty?
89
+ raise ConfigError, 'azure_storage_account needs to be specified' if @azure_storage_account.nil?
90
+ raise ConfigError, 'azure_container needs to be specified' if @azure_container.nil?
91
+ end
92
+
93
+ @blob_options = {}
94
+
95
+ if !@compute_checksums
96
+ @blob_options[:content_md5] = ''
72
97
  end
73
98
  end
74
99
 
@@ -79,11 +104,15 @@ module Fluent
79
104
  def get_access_token
80
105
  access_key_request = Faraday.new('http://169.254.169.254/metadata/identity/oauth2/token?' \
81
106
  "api-version=#{@azure_imds_api_version}" \
82
- '&resource=https://storage.azure.com/',
83
- headers: { 'Metadata' => 'true' })
84
- .get
85
- .body
86
- JSON.parse(access_key_request)['access_token']
107
+ '&resource=https://storage.azure.com/' \
108
+ "#{!azure_msi_client_id.nil? ? "&client_id=#{azure_msi_client_id}" : ''}",
109
+ headers: { 'Metadata' => 'true' }).get
110
+
111
+ if access_key_request.status == 200
112
+ JSON.parse(access_key_request.body)['access_token']
113
+ else
114
+ raise 'Access token request was not sucssessful. Possibly due to missing azure_msi_client_id config parameter.'
115
+ end
87
116
  end
88
117
 
89
118
  def start
@@ -91,7 +120,11 @@ module Fluent
91
120
  if @use_msi
92
121
  token_credential = Azure::Storage::Common::Core::TokenCredential.new get_access_token
93
122
  token_signer = Azure::Storage::Common::Core::Auth::TokenSigner.new token_credential
94
- @bs = Azure::Storage::Blob::BlobService.new(storage_account_name: @azure_storage_account, signer: token_signer)
123
+ @bs = Azure::Storage::Blob::BlobService.new(
124
+ storage_account_name: @azure_storage_account,
125
+ storage_dns_suffix: @azure_storage_dns_suffix,
126
+ signer: token_signer
127
+ )
95
128
 
96
129
  refresh_interval = @azure_token_refresh_interval * 60
97
130
  cancelled = false
@@ -108,7 +141,7 @@ module Fluent
108
141
  elsif !@azure_storage_connection_string.nil? && !@azure_storage_connection_string.empty?
109
142
  @bs = Azure::Storage::Blob::BlobService.create_from_connection_string(@azure_storage_connection_string)
110
143
  else
111
- @bs_params = { storage_account_name: @azure_storage_account }
144
+ @bs_params = { storage_account_name: @azure_storage_account, storage_dns_suffix: @azure_storage_dns_suffix }
112
145
 
113
146
  if !@azure_storage_access_key.nil? && !@azure_storage_access_key.empty?
114
147
  @bs_params.merge!({ storage_access_key: @azure_storage_access_key })
@@ -132,23 +165,26 @@ module Fluent
132
165
  end
133
166
 
134
167
  def write(chunk)
135
- metadata = chunk.metadata
136
168
  tmp = Tempfile.new('azure-')
137
169
  begin
138
170
  chunk.write_to(tmp)
139
171
 
140
- generate_log_name(metadata, @current_index)
172
+ generate_log_name(chunk, @current_index)
141
173
  if @last_azure_storage_path != @azure_storage_path
142
174
  @current_index = 0
143
- generate_log_name(metadata, @current_index)
175
+ generate_log_name(chunk, @current_index)
144
176
  end
145
177
 
146
178
  content = File.open(tmp.path, 'rb', &:read)
147
179
 
148
- append_blob(content, metadata)
180
+ append_blob(content, chunk)
149
181
  @last_azure_storage_path = @azure_storage_path
150
182
  ensure
151
- tmp.close(true) rescue nil
183
+ begin
184
+ tmp.close(true)
185
+ rescue StandardError
186
+ nil
187
+ end
152
188
  end
153
189
  end
154
190
 
@@ -177,7 +213,8 @@ module Fluent
177
213
  end
178
214
  end
179
215
 
180
- def generate_log_name(metadata, index)
216
+ def generate_log_name(chunk, index)
217
+ metadata = chunk.metadata
181
218
  time_slice = if metadata.timekey.nil?
182
219
  ''.freeze
183
220
  else
@@ -191,41 +228,39 @@ module Fluent
191
228
  '%{index}' => index
192
229
  }
193
230
  storage_path = @azure_object_key_format.gsub(/%{[^}]+}/, values_for_object_key)
194
- @azure_storage_path = extract_placeholders(storage_path, metadata)
231
+ @azure_storage_path = extract_placeholders(storage_path, chunk)
195
232
  end
196
233
 
197
- def append_blob(content, metadata)
234
+ def append_blob(content, chunk)
198
235
  position = 0
199
236
  log.debug "azure_storage_append_blob: append_blob.start: Content size: #{content.length}"
200
237
  loop do
201
- begin
202
- size = [content.length - position, AZURE_BLOCK_SIZE_LIMIT].min
203
- log.debug "azure_storage_append_blob: append_blob.chunk: content[#{position}..#{position + size}]"
204
- @bs.append_blob_block(@azure_container, @azure_storage_path, content[position..position + size - 1])
205
- position += size
206
- break if position >= content.length
207
- rescue Azure::Core::Http::HTTPError => e
208
- status_code = e.status_code
209
-
210
- if status_code == 409 # exceeds azure block limit
211
- @current_index += 1
212
- old_azure_storage_path = @azure_storage_path
213
- generate_log_name(metadata, @current_index)
214
-
215
- # If index is not a part of format, rethrow exception.
216
- if old_azure_storage_path == @azure_storage_path
217
- log.warn 'azure_storage_append_blob: append_blob: blocks limit reached, you need to use %{index} for the format.'
218
- raise
219
- end
220
-
221
- log.debug "azure_storage_append_blob: append_blob: blocks limit reached, creating new blob #{@azure_storage_path}."
222
- @bs.create_append_blob(@azure_container, @azure_storage_path)
223
- elsif status_code == 404 # blob not found
224
- log.debug "azure_storage_append_blob: append_blob: #{@azure_storage_path} blob doesn't exist, creating new blob."
225
- @bs.create_append_blob(@azure_container, @azure_storage_path)
226
- else
238
+ size = [content.length - position, AZURE_BLOCK_SIZE_LIMIT].min
239
+ log.debug "azure_storage_append_blob: append_blob.chunk: content[#{position}..#{position + size}]"
240
+ @bs.append_blob_block(@azure_container, @azure_storage_path, content[position..position + size - 1], options=@blob_options)
241
+ position += size
242
+ break if position >= content.length
243
+ rescue Azure::Core::Http::HTTPError => e
244
+ status_code = e.status_code
245
+
246
+ if status_code == 409 # exceeds azure block limit
247
+ @current_index += 1
248
+ old_azure_storage_path = @azure_storage_path
249
+ generate_log_name(chunk, @current_index)
250
+
251
+ # If index is not a part of format, rethrow exception.
252
+ if old_azure_storage_path == @azure_storage_path
253
+ log.warn 'azure_storage_append_blob: append_blob: blocks limit reached, you need to use %{index} for the format.'
227
254
  raise
228
255
  end
256
+
257
+ log.debug "azure_storage_append_blob: append_blob: blocks limit reached, creating new blob #{@azure_storage_path}."
258
+ @bs.create_append_blob(@azure_container, @azure_storage_path)
259
+ elsif status_code == 404 # blob not found
260
+ log.debug "azure_storage_append_blob: append_blob: #{@azure_storage_path} blob doesn't exist, creating new blob."
261
+ @bs.create_append_blob(@azure_container, @azure_storage_path)
262
+ else
263
+ raise
229
264
  end
230
265
  end
231
266
  log.debug 'azure_storage_append_blob: append_blob.complete'
@@ -11,6 +11,7 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
11
11
  end
12
12
 
13
13
  CONFIG = %(
14
+ azure_cloud AZUREGERMANCLOUD
14
15
  azure_storage_account test_storage_account
15
16
  azure_storage_access_key MY_FAKE_SECRET
16
17
  azure_container test_container
@@ -18,6 +19,12 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
18
19
  path log
19
20
  ).freeze
20
21
 
22
+ CONNSTR_CONFIG = %(
23
+ azure_storage_connection_string https://test
24
+ time_slice_format %Y%m%d-%H
25
+ path log
26
+ ).freeze
27
+
21
28
  MSI_CONFIG = %(
22
29
  azure_storage_account test_storage_account
23
30
  azure_container test_container
@@ -49,6 +56,7 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
49
56
 
50
57
  test 'config with access key should set instance variables' do
51
58
  d = create_driver
59
+ assert_equal 'core.cloudapi.de', d.instance.instance_variable_get(:@azure_storage_dns_suffix)
52
60
  assert_equal 'test_storage_account', d.instance.azure_storage_account
53
61
  assert_equal 'MY_FAKE_SECRET', d.instance.azure_storage_access_key
54
62
  assert_equal 'test_container', d.instance.azure_container
@@ -60,12 +68,19 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
60
68
  d = create_driver conf: MSI_CONFIG
61
69
  assert_equal 'test_storage_account', d.instance.azure_storage_account
62
70
  assert_equal 'test_container', d.instance.azure_container
63
- assert_equal true, d.instance.use_msi
71
+ assert_equal true, d.instance.instance_variable_get(:@use_msi)
64
72
  assert_equal true, d.instance.auto_create_container
65
73
  assert_equal '%{path}%{time_slice}-%{index}.log', d.instance.azure_object_key_format
66
74
  assert_equal 120, d.instance.azure_token_refresh_interval
67
75
  assert_equal '1970-01-01', d.instance.azure_imds_api_version
68
76
  end
77
+
78
+ test 'config with connection string should set instance variables' do
79
+ d = create_driver conf: CONNSTR_CONFIG
80
+ assert_equal 'https://test', d.instance.azure_storage_connection_string
81
+ assert_equal false, d.instance.instance_variable_get(:@use_msi)
82
+ assert_equal true, d.instance.auto_create_container
83
+ end
69
84
  end
70
85
 
71
86
  sub_test_case 'test path slicing' do
@@ -92,15 +107,13 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
92
107
  # This class is used to create an Azure::Core::Http::HTTPError. HTTPError parses
93
108
  # a response object when it is created.
94
109
  class FakeResponse
95
- def initialize(status=404)
110
+ def initialize(status = 404)
96
111
  @status = status
97
- @body = "body"
112
+ @body = 'body'
98
113
  @headers = {}
99
114
  end
100
115
 
101
- attr_reader :status
102
- attr_reader :body
103
- attr_reader :headers
116
+ attr_reader :status, :body, :headers
104
117
  end
105
118
 
106
119
  # This class is used to test plugin functions which interact with the blob service
@@ -111,11 +124,11 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
111
124
  end
112
125
  attr_reader :blocks
113
126
 
114
- def append_blob_block(container, path, data)
127
+ def append_blob_block(_container, _path, data, options={})
115
128
  @blocks.append(data)
116
129
  end
117
130
 
118
- def get_container_properties(container)
131
+ def get_container_properties(_container)
119
132
  unless @response.status_code == 200
120
133
  raise Azure::Core::Http::HTTPError.new(@response)
121
134
  end
@@ -125,18 +138,18 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
125
138
  sub_test_case 'test container_exists' do
126
139
  test 'container 404 returns false' do
127
140
  d = create_driver service: FakeBlobService.new(404)
128
- assert_false d.instance.container_exists? "anything"
141
+ assert_false d.instance.container_exists? 'anything'
129
142
  end
130
143
 
131
144
  test 'existing container returns true' do
132
145
  d = create_driver service: FakeBlobService.new(200)
133
- assert_true d.instance.container_exists? "anything"
146
+ assert_true d.instance.container_exists? 'anything'
134
147
  end
135
148
 
136
149
  test 'unexpected exception raises' do
137
150
  d = create_driver service: FakeBlobService.new(500)
138
151
  assert_raise_kind_of Azure::Core::Http::HTTPError do
139
- d.instance.container_exists? "anything"
152
+ d.instance.container_exists? 'anything'
140
153
  end
141
154
  end
142
155
  end
@@ -175,10 +188,10 @@ class AzureStorageAppendBlobOutTest < Test::Unit::TestCase
175
188
 
176
189
  test 'long buffer appends multiple times' do
177
190
  limit = Fluent::Plugin::AzureStorageAppendBlobOut::AZURE_BLOCK_SIZE_LIMIT
178
- buf_1 = 'a' * limit
179
- buf_2 = 'a' * 3
180
- blocks = fake_appended_blocks buf_1 + buf_2
181
- assert_equal [buf_1, buf_2], blocks
191
+ buf1 = 'a' * limit
192
+ buf2 = 'a' * 3
193
+ blocks = fake_appended_blocks buf1 + buf2
194
+ assert_equal [buf1, buf2], blocks
182
195
  end
183
196
  end
184
197
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-azure-storage-append-blob-lts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas-Taha El Sesiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,13 +87,14 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '2'
89
89
  description: Fluentd plugin to upload logs to Azure Storage append blobs. Fork of
90
- https://github.com/elsesiy/fluent-plugin-azure-storage-append-blob
90
+ https://github.com/microsoft/fluent-plugin-azure-storage-append-blob
91
91
  email:
92
- - ''
92
+ - github@elsesiy.com
93
93
  executables: []
94
94
  extensions: []
95
95
  extra_rdoc_files: []
96
96
  files:
97
+ - ".github/CODEOWNERS"
97
98
  - ".github/workflows/publish.yaml"
98
99
  - ".github/workflows/test.yaml"
99
100
  - ".gitignore"