-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
started centralizing api Test utils #1863
Conversation
49545d3
to
adad168
Compare
object TestUtils { | ||
|
||
private lazy val ParsedPackageId: String = | ||
UniversalArchiveReader().readFile(Config.defaultDarFile).get.main._1 // Test.dar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wont work in the tool, since the test tool passes a dar file at a different than the default location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but this is identical to the state what we have now. I wanted to centralise this logic first and foremost. We can think about how to make it dynamic later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break Ledger API Test Tool, which is our publicly exposed tool.
private val MaximumRecordTime = | ||
LedgerEffectiveTime.copy(seconds = LedgerEffectiveTime.seconds + 30L) | ||
|
||
private def randomCommandId: String = UUID.randomUUID().toString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to be plugged into the machinery I am setting up to control if identifiers are randomized or not. My draft for this is here: https://github.com/digital-asset/daml/pull/1735/files#diff-5f0c4de564dbea036385a0cda87b7fd9R5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let me know when that lands. Note, that this part of the code is not used yet.
c280273
to
e8f9cee
Compare
@@ -25,16 +23,9 @@ import com.digitalasset.platform.PlatformApplications | |||
import com.google.protobuf.timestamp.Timestamp | |||
import scalaz.syntax.tag._ | |||
|
|||
class TestTemplateIds(config: PlatformApplications.Config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this in interim. Next move it into class TestUtils
in a separate PR.
dc5dab0
to
b1db03a
Compare
@gleber-da please take another look. I don't get why I have so much formatting related diffs. (I mean how can we have differently formatted code on master) UPDATE: looks like a still have some things to fix. Weirdly locally it all compiled. |
b1db03a
to
27566d6
Compare
|
||
} | ||
|
||
object LedgerOffsets { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a reminder for myself: use this to address #1961 (comment) once this has been merged. Thanks @gaboraranyossy-da.
0ad339e
to
149ebb6
Compare
ce94814
to
8e46ef7
Compare
8e46ef7
to
e29ce53
Compare
contributes to #1746
Centralises testing utilities around:
Note that TransactionServiceIT is the test bed of the changes, the rest of the test will be ported only after that.
Pull Request Checklist
NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.