-
Notifications
You must be signed in to change notification settings - Fork 6
TC-3071 scale test for put and patch advisory lables #78
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
base: main
Are you sure you want to change the base?
Conversation
ctron
left a comment
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.
Running that change over and over again, it would always set the same value on the same entity.
I think we should have this a bit more random. At least when it comes to the values. One idea could be to use a timestamp as a value.
Another idea could be to pick a random advisory, instead of using only a single (configured) one.
daeefa1 to
e0e85e5
Compare
I chose the second approach. Please review it again. |
e0e85e5 to
2f72b0a
Compare
Great. Sorry for not being clear enough. I think in this case the values should not be configured. There seems to be no benefit of doing that. But simply always fetch it from the database. |
|
The corresponding pull request. Thanks |
I am not sure how this relates to the request of not having the value configured, but evaluated from the database? |
If put_advisory_labels and patch_advisory_labels are empty in the scenario, these two methods will be skipped. Does trustify-scale-test-run regenerate the scenario file on every run? Do you mean removing put_advisory_labels and patch_advisory_labels from the scenario and reading them from the database each time we run the scale test? However, in this case, no database is specified when the test is executed. |
2f72b0a to
7e12e20
Compare
Right, this is what I tried to say here. Those values should not be configured. But just picked randomly from the database, each time it runs. I think this could be done by using the API. Or it could be done by directly accessing the database. I think using the API might make it easier to run, as no DB connection would be required. It may be beneficial to split this up into multiple steps. |
Does this mean that before performing each put or patch action, an ID needs to be queried first, just like it is done when uploading and deleting advisories? |
scenarios/full-20250604.json5
Outdated
| "download_advisory": "24ae57c3-4b57-4f4e-82c1-83ae26059a89", | ||
| "get_advisory": "24ae57c3-4b57-4f4e-82c1-83ae26059a89" | ||
| "get_advisory": "24ae57c3-4b57-4f4e-82c1-83ae26059a89", | ||
| "put_advisory_lables": [ |
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.
Please remove those arrays.
src/restapi.rs
Outdated
| user: &mut GooseUser, | ||
| ) -> Result<String, Box<TransactionError>> { | ||
| // Generate random 3-digit offset | ||
| let offset = rand::thread_rng().gen_range(0..=999); |
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.
Instead of assuming a maximum number, you can (on startup) query the total number.
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.
please check again.
63d075b to
e195f7d
Compare

No description provided.