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

fix(functional-tests): Update sms client to check for target #18514

Closed
wants to merge 1 commit into from

Conversation

vpomerleau
Copy link
Contributor

@vpomerleau vpomerleau commented Mar 6, 2025

Because

  • We only want to set up the twilio client in CI if the target is stage or prod otherwise use redis

This pull request

  • Check for target name

Issue that this pull request solves

Closes: (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@@ -38,7 +38,7 @@ export abstract class BaseTarget {
);
this.authClient = this.createAuthClient(keyStretchVersion);
this.emailClient = new EmailClient(emailUrl);
this.smsClient = new SmsClient();
this.smsClient = new SmsClient(this.name);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not accepted to access an abstract property in the constructor. We could make this a lazy getter though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noticed exactly this after pushing... Updated with explicit initialization of the sms client before seeing your comment, but I can see now that a lazy getter might be preferred since we only use the sms client for a subset of tests.

Copy link
Contributor

@dschom dschom Mar 6, 2025

Choose a reason for hiding this comment

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

There were a couple issues with the way Twilio vs Redis were configured. I ended up just making the config really granular and added the ability to override per testing environment. This way we can probably get out of just about any weird situation.

See my PR over here. We can either land and cherry pick that entire PR, or do a partially cherry pick on the changes of that PR on the functional-tests folder.

Because:

* We only want to set up the twilio client in CI if the target is stage or prod otherwise use redis

This commit:

* Check for target name

Closes #
@vpomerleau vpomerleau force-pushed the attempt-funct-test-twilio-client-fix branch from 4288e1e to 930a9b0 Compare March 6, 2025 01:38
@vpomerleau
Copy link
Contributor Author

Closing in favour of #18500

@vpomerleau vpomerleau closed this Mar 6, 2025
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.

2 participants