<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/spec/workers, branch faster-spex</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Fixes: #4727@0.1h; Added organisation to clone for and rebased master</title>
<updated>2017-10-17T10:28:35+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-10-17T10:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=0b744d48fdc84445f593114fe61baaafca4e17f4'/>
<id>0b744d48fdc84445f593114fe61baaafca4e17f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes: #4727@0.5h; Worker speced and implemented</title>
<updated>2017-10-17T10:19:59+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-10-17T08:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=bacb624a9d0415337dfab6418de240cd2afa7305'/>
<id>bacb624a9d0415337dfab6418de240cd2afa7305</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes: #4629@0.5h; 2nd Code Review</title>
<updated>2017-10-09T14:47:37+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-10-09T14:47:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=a8f97544fd048d50ef63dae1c74cff2de077152d'/>
<id>a8f97544fd048d50ef63dae1c74cff2de077152d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs: #4629@1h; Implementing CR + missing worker spec</title>
<updated>2017-10-09T13:53:45+00:00</updated>
<author>
<name>Robert</name>
</author>
<published>2017-10-09T13:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=0ebaac1e338dd50d8cd9a93322a08fae7c503771'/>
<id>0ebaac1e338dd50d8cd9a93322a08fae7c503771</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid Appartment schema creation when cloning is pending. Add a spec which performs a real referential clone. Refs #4335</title>
<updated>2017-09-07T13:38:34+00:00</updated>
<author>
<name>Alban Peignier</name>
</author>
<published>2017-09-07T13:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7603900279d8578724944d4e20e910c7fc7f0549'/>
<id>7603900279d8578724944d4e20e910c7fc7f0549</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>WorkbenchImportWorker spec: Check `ended_at` update after import</title>
<updated>2017-09-05T12:41:13+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-05T12:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=23793ca8865501fcb0672ce7e62d1e0b6417d0bd'/>
<id>23793ca8865501fcb0672ce7e62d1e0b6417d0bd</id>
<content type='text'>
The import job now updates its `ended_at` time at the end of the import
job. The mock didn't know this, though, so it gave us an error at that
call. Add a new expectation for the update of the `ended_at` time to get
this test to pass again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The import job now updates its `ended_at` time at the end of the import
job. The mock didn't know this, though, so it gave us an error at that
call. Add a new expectation for the update of the `ended_at` time to get
this test to pass again.
</pre>
</div>
</content>
</entry>
<entry>
<title>WorkbenchImportWorker spec: Catch `StopIteration` exception</title>
<updated>2017-09-05T11:22:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-05T11:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=1485d68a3bef38fa3ed61cf610855861cea405b7'/>
<id>1485d68a3bef38fa3ed61cf610855861cea405b7</id>
<content type='text'>
The code was changed in 038710b22ccf3dd2421ec8d07fae45ef05a47ada, but
the tests weren't changed to reflect this.

In that change, the subdir enumeration is stopped if the `HTTPService`
POST request fails with an error.

This caused us to receive the following error when running the tests:

    2) WorkbenchImportWorker multireferential zipfile with error downloads a zip file, cuts it, and uploads some pieces
       Failure/Error:
         expect { worker.perform import.id }.to raise_error(
           StopIteration,
           post_response_failure.body
         )

         expected StopIteration with {:error=&gt;"What was you thinking"}, got #&lt;StopIteration: {:error=&gt;"What was you thinking"}&gt; with backtrace:
           # ./app/workers/workbench_import_worker.rb:63:in `upload_entry_group'
           # ./app/workers/workbench_import_worker.rb:38:in `each'
           # ./app/workers/workbench_import_worker.rb:38:in `each_with_index'
           # ./app/workers/workbench_import_worker.rb:38:in `upload'
           # ./app/workers/workbench_import_worker.rb:15:in `perform'
           # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (4 levels) in &lt;top (required)&gt;'
           # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
           # -e:1:in `&lt;main&gt;'
       # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
       # -e:1:in `&lt;main&gt;'

In order to get around this, just catch the error. Hopefully this is
right.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code was changed in 038710b22ccf3dd2421ec8d07fae45ef05a47ada, but
the tests weren't changed to reflect this.

In that change, the subdir enumeration is stopped if the `HTTPService`
POST request fails with an error.

This caused us to receive the following error when running the tests:

    2) WorkbenchImportWorker multireferential zipfile with error downloads a zip file, cuts it, and uploads some pieces
       Failure/Error:
         expect { worker.perform import.id }.to raise_error(
           StopIteration,
           post_response_failure.body
         )

         expected StopIteration with {:error=&gt;"What was you thinking"}, got #&lt;StopIteration: {:error=&gt;"What was you thinking"}&gt; with backtrace:
           # ./app/workers/workbench_import_worker.rb:63:in `upload_entry_group'
           # ./app/workers/workbench_import_worker.rb:38:in `each'
           # ./app/workers/workbench_import_worker.rb:38:in `each_with_index'
           # ./app/workers/workbench_import_worker.rb:38:in `upload'
           # ./app/workers/workbench_import_worker.rb:15:in `perform'
           # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (4 levels) in &lt;top (required)&gt;'
           # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
           # -e:1:in `&lt;main&gt;'
       # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
       # -e:1:in `&lt;main&gt;'

In order to get around this, just catch the error. Hopefully this is
right.
</pre>
</div>
</content>
</entry>
<entry>
<title>WorkbenchImportWorker spec: Mock upload params</title>
<updated>2017-09-05T11:19:13+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-05T11:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=edbdd5a05fb9b75a6565c31f37d1ce8a501db265'/>
<id>edbdd5a05fb9b75a6565c31f37d1ce8a501db265</id>
<content type='text'>
Was getting this error as a result of the new parameters expected in
`mock_post`:

    2) WorkbenchImportWorker multireferential zipfile with error downloads a zip file, cuts it, and uploads some pieces
       Failure/Error:
         HTTPService.post_resource(
           host: export_host,
           path: export_path,
           params: params(eg_file, eg_name))

         HTTPService received :post_resource with unexpected arguments
           expected: ({:host=&gt;"http://www.example.com", :path=&gt;"/api/v1/netex_imports.json", :params=&gt;{:netex_import=&gt;{:par... @original_filename="subdir 0.zip", @local_path="local.path", @io=#&lt;Double "subdir 0"&gt;, @opts={}&gt;}}})
                got: ({:host=&gt;"http://www.example.com", :path=&gt;"/api/v1/netex_imports.json", :params=&gt;{:netex_import=&gt;{:par.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip&gt;, @opts={}&gt;}}})
         Diff:
         @@ -7,5 +7,5 @@
                :workbench_id=&gt;1019,
                :name=&gt;"subdir 0",
                :file=&gt;
         -       #&lt;UploadIO:0x007f9bd144dbe8 @content_type="application/zip", @original_filename="subdir 0.zip", @local_path="local.path", @io=#&lt;Double "subdir 0"&gt;, @opts={}&gt;}}}]
         +       #&lt;UploadIO:0x007f9bd14a1450
         @content_type="application/zip", @original_filename="subdir 0.zip", @local_path="/.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip", @io=#&lt;File:/.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip&gt;, @opts={}&gt;}}}]

       # ./app/workers/workbench_import_worker.rb:29:in `execute_post'
       # ./app/workers/workbench_import_worker.rb:59:in `upload_entry_group'
       # ./app/workers/workbench_import_worker.rb:38:in `each'
       # ./app/workers/workbench_import_worker.rb:38:in `each_with_index'
       # ./app/workers/workbench_import_worker.rb:38:in `upload'
       # ./app/workers/workbench_import_worker.rb:15:in `perform'
       # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
       # -e:1:in `&lt;main&gt;'

To get around this, decided to just mock the `HTTPService#upload` method
because I don't really care about these attributes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Was getting this error as a result of the new parameters expected in
`mock_post`:

    2) WorkbenchImportWorker multireferential zipfile with error downloads a zip file, cuts it, and uploads some pieces
       Failure/Error:
         HTTPService.post_resource(
           host: export_host,
           path: export_path,
           params: params(eg_file, eg_name))

         HTTPService received :post_resource with unexpected arguments
           expected: ({:host=&gt;"http://www.example.com", :path=&gt;"/api/v1/netex_imports.json", :params=&gt;{:netex_import=&gt;{:par... @original_filename="subdir 0.zip", @local_path="local.path", @io=#&lt;Double "subdir 0"&gt;, @opts={}&gt;}}})
                got: ({:host=&gt;"http://www.example.com", :path=&gt;"/api/v1/netex_imports.json", :params=&gt;{:netex_import=&gt;{:par.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip&gt;, @opts={}&gt;}}})
         Diff:
         @@ -7,5 +7,5 @@
                :workbench_id=&gt;1019,
                :name=&gt;"subdir 0",
                :file=&gt;
         -       #&lt;UploadIO:0x007f9bd144dbe8 @content_type="application/zip", @original_filename="subdir 0.zip", @local_path="local.path", @io=#&lt;Double "subdir 0"&gt;, @opts={}&gt;}}}]
         +       #&lt;UploadIO:0x007f9bd14a1450
         @content_type="application/zip", @original_filename="subdir 0.zip", @local_path="/.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip", @io=#&lt;File:/.../stif-boiv/tmp/imports/WorkbenchImport_subdir 0_38821.zip&gt;, @opts={}&gt;}}}]

       # ./app/workers/workbench_import_worker.rb:29:in `execute_post'
       # ./app/workers/workbench_import_worker.rb:59:in `upload_entry_group'
       # ./app/workers/workbench_import_worker.rb:38:in `each'
       # ./app/workers/workbench_import_worker.rb:38:in `each_with_index'
       # ./app/workers/workbench_import_worker.rb:38:in `upload'
       # ./app/workers/workbench_import_worker.rb:15:in `perform'
       # ./spec/workers/workbench_import_worker_spec.rb:105:in `block (3 levels) in &lt;top (required)&gt;'
       # -e:1:in `&lt;main&gt;'

To get around this, decided to just mock the `HTTPService#upload` method
because I don't really care about these attributes.
</pre>
</div>
</content>
</entry>
<entry>
<title>WorkbenchImportWorker spec: Use `subdirs` in place of `entry_groups`</title>
<updated>2017-09-05T11:10:42+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-05T11:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=1c3148a40966f0457117e317bb1144967d39c839'/>
<id>1c3148a40966f0457117e317bb1144967d39c839</id>
<content type='text'>
Since the concept of `entry_groups` was changed to `subdirs`, this
change needs to be reflected in the tests.

Instead of looping over `entry_groups`, we now loop over `subdirs`, and
pass this object directly to `mock_post`.

The `mock_post` helper is now rewritten to reflect the new structure
of post parameters. Remove the `params` `let` because it's not used
anywhere else and we need to pass the arguments to `mock_post` into it.

This currently errors because `Faraday::UploadIO` isn't passed the
parameters that are expected in `mock_post`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the concept of `entry_groups` was changed to `subdirs`, this
change needs to be reflected in the tests.

Instead of looping over `entry_groups`, we now loop over `subdirs`, and
pass this object directly to `mock_post`.

The `mock_post` helper is now rewritten to reflect the new structure
of post parameters. Remove the `params` `let` because it's not used
anywhere else and we need to pass the arguments to `mock_post` into it.

This currently errors because `Faraday::UploadIO` isn't passed the
parameters that are expected in `mock_post`.
</pre>
</div>
</content>
</entry>
<entry>
<title>WorkbenchImportWorker spec: Change `entry_group_streams` to `subdirs`</title>
<updated>2017-09-04T14:50:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-09-04T14:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=bf56f221a0eedbceea99a1e20c2876383aa6c0dd'/>
<id>bf56f221a0eedbceea99a1e20c2876383aa6c0dd</id>
<content type='text'>
This changed in the new `ZipService`. We're now using a `Subdir` object,
we we need to use that in the tests instead of the
`entry_group_streams`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changed in the new `ZipService`. We're now using a `Subdir` object,
we we need to use that in the tests instead of the
`entry_group_streams`.
</pre>
</div>
</content>
</entry>
</feed>
