Skip to content
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

(tests): Restructure ScriptSpec #265

Merged
merged 3 commits into from
Jun 24, 2023

Conversation

saksofon997
Copy link
Contributor

Description:

  • Improve ScriptSpec refactor

Part of #251

dbulaja98
dbulaja98 previously approved these changes Jun 24, 2023
test("create script with source") {
val source = "doc['day_of_week'].value"
test("script") {
val source = "doc['day_of_week'].value"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use:

val script = Script("doc['day_of_week'].value")
val scriptWithParams = Script("doc['day_of_week'].value * params['factor']").params("factor" -> 2)
vall scriptWithLangAndParams = Script(...)

val script = Script("doc['day_of_week'].value")
val expected =
test("script") {
val scriptOnly = Script("doc['day_of_week'].value")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have:

val script = ... 
val scriptWithParams = ... 
val scriptWithLang = ...
val scriptWithLangAndParams = ...

val expected = ...
val expectedWithParams = ... 
val expectedWithLang = ...

...

drmarjanovic
drmarjanovic previously approved these changes Jun 24, 2023
@drmarjanovic drmarjanovic changed the title Improve ScriptSpec refactor (tests): Restructure ScriptSpec Jun 24, 2023
@drmarjanovic drmarjanovic merged commit 5ced9c9 into lambdaworks:main Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants