-
Notifications
You must be signed in to change notification settings - Fork 14
WIP: Integration tests using local db #1488
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
these services should be used only in integration tests
use factory_boy to create test data for integration tests using local db
92d9af2
to
b0c5f9f
Compare
[ | ||
"maestro", | ||
"redhat", | ||
"microsoft", | ||
"broonie", | ||
"linaro", | ||
"0dayci", | ||
"syzbot", | ||
"android-mainline", | ||
"next-pending-fixes", | ||
] |
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.
Feels a bit weird that you are mixing origin names with tree names. Is this variable supposed to store realistic origins or just any value?
) | ||
builds.append(failed_build) | ||
|
||
[uncategorized_issues] = [i for i in issues if i.id == "Uncategorized"] |
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.
Uncategorized tests are (ironically) a category that we created just for tests that failed but had no incidents related to them, there are no issues called "Uncategorized". In other words, if a test fails but has no incidents related to it, then that test is uncategorized.
"5b4ec6e1eb7603b6d86a172d77efdf75eb741e7e", # ALLWINNER_HARDWARE | ||
"0704a15b930cf97073ce091a0cd7ad32f2304329", # ALLWINNER_HARDWARE | ||
] | ||
else random.choice( |
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.
Add the possibility for null status as well please
"maestro:e602fca280d85d8e603f7c0aff68363bb0cd7993", | ||
"broonie:bb2eb9603973cb353faa8e780b304d3537220228", | ||
"linaro:30MeoIqiN9rKm6s2lQLaThEnGHF", | ||
"Uncategorized", |
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.
ditto no Uncategorized issues
"linaro", | ||
"0dayci", | ||
"syzbot", | ||
"android-mainline", |
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.
ditto origins + treeName
else BuildFactory() | ||
) | ||
) | ||
origin = factory.LazyAttribute(lambda obj: obj.build.origin) |
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.
I'd suggest adding the possibility of a test having an origin that's different from the build's origin, this is something that is already happening
} | ||
) | ||
|
||
status = factory.LazyAttribute( |
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.
feels like a lot of hardcoded strings, maybe move them to variables?
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.
do you need to use docker-compose
instead of docker compose
? I believe the second one is the newer format
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.
ditto docker-compose / docker compose
WIP