Commit Graph

6 Commits

Author SHA1 Message Date
Andreas Herrmann
4b1438276c
Update Bazel 2.1.0 --> 3.3.1 (#6761)
* Upgrade nixpkgs revision

* Remove unused minio

It used to be used as a gateway to push the Nix cache to GCS, but has
since been replaced by nix-store-gcs-proxy.

* Update Bazel on Windows

changelog_begin
changelog_end

* Fix hlint warnings

The nixpkgs update implied an hlint update which enabled new warnings.

* Fix "Error applying patch"

Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files
and applying patches has been reversed. The allows users to define
patches to these files that will not be immediately overwritten.
However, it also means that patches on another repository's original
`WORKSPACE` file will likely become invalid.

* a948eb7255
* https://github.com/bazelbuild/bazel/issues/10681

Hint: If you're generating a patch with `git` then you can use the
following command to exclude the `WORKSPACE` file.

```
git diff ':(exclude)WORKSPACE'
```

* Update rules_nixpkgs

* nixpkgs location expansion escaping

* Drop --noincompatible_windows_native_test_wrapper

* client_server_test using sh_inline_test

client_server_test used to produce an executable shell script in form of
a text file output. However, since the removal of
`--noincompatible_windows_native_test_wrapper` this no longer works on
Windows since `.sh` files are not directly executable on Windows.

This change fixes the issue by producing the script file in a dedicated
rule and then wrapping it in a `sh_test` rule which also works on
Windows.

* daml_test using sh_inline_test

* daml_doc_test using sh_inline_test

* _daml_validate_test using sh_inline_test

* damlc_compile_test using sh_inline_test

* client_server_test find .exe on Windows

* Bump Windows cache for Bazel update

Remove `clean --expunge` after merge.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 09:46:04 +02:00
Stefano Baghino
ec143dd87b
Add migration test for divulgence (#6376)
* Add migration test for divulgence

Closes #6349

changelog_begin
changelog_end

* Add missing newline

* Address https://github.com/digital-asset/daml/pull/6376#discussion_r441396194

* Address https://github.com/digital-asset/daml/pull/6376#discussion_r441394771

* Remove unnecessary parentheses

- Address https://github.com/digital-asset/daml/pull/6376#discussion_r441424486
- Address https://github.com/digital-asset/daml/pull/6376#discussion_r441424344
2020-06-17 10:57:22 +00:00
Moritz Kiefer
1d5cf688a5
Interleave migration tests (#6366)
Currently we run all migration tests on a separate postgres
instance. This PR changes this to interleave the steps so that we can
run all tests on a single postgres instance.

We do get slightly worse errors for now but the assertion failures
should be informative enough that I don’t think assigning them to the
test that caused them is an issue (and if it is we can just change the
error message).

changelog_begin
changelog_end
2020-06-16 17:13:06 +02:00
Moritz Kiefer
d93b7b2513
Factor out generic types from migration tests (#6360)
* Factor out generic types from migration tests

This PR factors out `Event` and `Transaction` so we can reuse them for
different tests. To make that work we simply remove the type parameter
from ContractId which didn’t help much anyway and store the undecoded
JSON value in the constructors. The use sites are basically unchanged
thanks to pattern synonyms which match the old constructors.

changelog_begin
changelog_end

* Explain missing package id

changelog_begin
changelog_end
2020-06-16 11:10:22 +02:00
Stefano Baghino
2fc2237989
Add migration test for contract key transfers (#6298)
* Add migration test for contract key transfers

Fixes #6238

changelog_begin
changelog_end

* Complete transaction verification

* Remove unnecessary bits

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439242912

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439244897

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439246799

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r438779291

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r438784947

* shut up buildifier

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-06-12 12:29:27 +00:00
Moritz Kiefer
f9f216ed86
Make runner for migration tests more generic (#6266)
This factors out the parts of the migration runner that are specific
to the current test so we can easily add new tests.

Currently the postgres instance and the model DAR are shared. It’s
easy to separate that and have them be per test. I don’t have strong
feelings on what the right approach here.

changelog_begin
changelog_end
2020-06-08 17:15:33 +02:00