-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
[#952] Updated Lagoon deployment script to use variable update
.
#1209
Conversation
.drevops/tests/bats/deployment1.bats
Outdated
@@ -314,16 +314,13 @@ load _helper.deployment.bash | |||
# Get a list of environments. | |||
assert_contains "-l testlagoon list environments -p testproject --output-json --pretty" "$(mock_get_call_args "${mock_lagoon}" 2)" | |||
# Explicitly set DB overwrite flag to 0 due to a bug in Lagoon. | |||
assert_contains "-l testlagoon delete variable -p testproject -e testbranch -N DREVOPS_PROVISION_OVERRIDE_DB" "$(mock_get_call_args "${mock_lagoon}" 3)" | |||
assert_contains "-l testlagoon add variable -p testproject -e testbranch -N DREVOPS_PROVISION_OVERRIDE_DB -V 0 -S global" "$(mock_get_call_args "${mock_lagoon}" 4)" | |||
assert_contains "-l testlagoon update variable -p testproject -e testbranch -N DREVOPS_PROVISION_OVERRIDE_DB -V 0 -S global" "$(mock_get_call_args "${mock_lagoon}" 4)" |
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.
Had trouble running locally - with the deployment code we could test it in isolation as unit tests rather than deploying actual builds.
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.
@richardgaunt the numbers (3
, 4
etc.) at the end of the assertions need to be updated throughout the whole test after the order being modified (this is due to using an old way of asserting that commands run in the order)
assert_contains "-l testlagoon update variable -p testproject -e testbranch -N DREVOPS_PROVISION_OVERRIDE_DB -V 0 -S global" "$(mock_get_call_args "${mock_lagoon}" 3)"
@richardgaunt
This is to make sure that Lagoon's API supports running |
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.
@richardgaunt
Could you please update tests. Thank you
Tested with the PR new environment creation, tested with overriding a database. All worked correctly and the variables were correct values after deploying. |
variable update
.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1209 +/- ##
============================================
- Coverage 71.88% 61.51% -10.37%
============================================
Files 38 38
Lines 2849 2843 -6
============================================
- Hits 2048 1749 -299
- Misses 801 1094 +293 ☔ View full report in Codecov by Sentry. |
6241c1b
to
cda0d0f
Compare
closes #952
Checklist before requesting a review
[#123] Verb in past tense with dot at the end.
Changed
section about WHY something was done if this was not a normal implementationChanged
Screenshots