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

Provide test proxy credentials for functional tests #6145

Open
igor-sirotin opened this issue Nov 29, 2024 · 8 comments
Open

Provide test proxy credentials for functional tests #6145

igor-sirotin opened this issue Nov 29, 2024 · 8 comments
Assignees
Labels

Comments

@igor-sirotin
Copy link
Collaborator

We need test proxy credentials in the functional tests. In the future we'll mock the providers, but we can't do it quickly right now.

Functional tests will expect these env vars:

  • STATUS_PROXY_USER
  • STATUS_PROXY_PASSWORD

Tests side done here:

@igor-sirotin igor-sirotin changed the title Provide proxy credentials for functional tests Provide test proxy credentials for functional tests Nov 29, 2024
@jakubgs
Copy link
Member

jakubgs commented Dec 1, 2024

Are we sure the tests won't create a very large volume of requests? What's expected?

@igor-sirotin
Copy link
Collaborator Author

Are we sure the tests won't create a very large volume of requests? What's expected?

@jakubgs I can't promise anything about the usage 😐. But right now this is blocking functional test runs.

We will eventually, but it's not fast:

  • mock the providers and try to make 0 requests
  • implement "smart caching" on proxy

@jakubgs
Copy link
Member

jakubgs commented Dec 2, 2024

I see, that's fair, and indeed in a perfect world we'd mock everything, but it's understandable this is the simplest approach.

@mendelskiv93 could you please ensure the status-go tests have access to credentials to use proxy.test fleet.

But I would recommend creating a separate username and password for this purpose:
https://github.com/status-im/infra-proxy/blob/e815a56fd90fc34615201e87490c8a72ba11ab59/ansible/group_vars/proxy.test.yml#L13-L17

So it's easier to revoke this access in the future when we will probably create separate proxy.staging for tests like this.

@mendelskiv93
Copy link
Contributor

@igor-sirotin Is there a way we can do:

      usernameVariable: 'STATUS_BUILD_PROXY_USER',
      passwordVariable: 'STATUS_BUILD_PROXY_PASSWORD'

like in status-mobile and status-desktop?

@igor-sirotin
Copy link
Collaborator Author

@mendelskiv93 if these are already available in status-go repo, then sure, we can use it 👍

@mendelskiv93
Copy link
Contributor

@igor-sirotin yes they are!

@igor-sirotin
Copy link
Collaborator Author

igor-sirotin commented Dec 9, 2024

@mendelskiv93 just in case, did you create separate credentials for this purpose?

This case is dangerous because we could potentially (but we'll prevent it as much as possible) leak the key in logs. So we must have dedicated username/password for simple revoke/rotate later.

@mendelskiv93
Copy link
Contributor

@igor-sirotin yes I did, it will be used only by status-go.
Hopefully will not come to that but it can be easily removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants