-
Notifications
You must be signed in to change notification settings - Fork 89
Fix unit test suite #1037
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: v3_er
Are you sure you want to change the base?
Fix unit test suite #1037
Conversation
Tests using BitbucketServer as git provider were failing because JF_GIT_BB_USERNAME is mandatory for that provider. Added the missing environment variable to all affected tests.
The test expected validation in order: Provider → Owner → Token → Repo but the code validates: Repo → Provider → Owner → Token. Updated test to match the actual code behavior.
| SetEnvAndAssert(t, map[string]string{GitRepoOwnerEnv: "jfrog"}) | ||
| _, err = extractGitParamsFromEnvs() | ||
| assert.EqualError(t, err, "'JF_GIT_TOKEN' environment variable is missing") | ||
|
|
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.
lets add the final env vars like you did each at the time and end up the test with checking we have no errors (and if you want to be very strict- check that all env vars are set correctly, although it seems there is not much to fail there)
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.
Great! see my comment
please make sure to mark this test as done in the test plan

Fixed the unit test suite bb test as it was missing a param