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 github service tests #155

Merged
67 commits merged into from Aug 3, 2022
Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 3, 2022

No description provided.

@ghost ghost requested a review from kaladay August 3, 2022 00:49
@ghost ghost changed the base branch from tech_debt_fixes-experiment to tech_debt_fixes August 3, 2022 18:17
@ghost ghost merged commit 08d074a into tech_debt_fixes Aug 3, 2022
@ghost ghost deleted the test_debt_fixes_experiment_fixes branch August 3, 2022 18:42
ghost pushed a commit that referenced this pull request Aug 3, 2022
* Begin updating incompletely migrated code.

Fix easy to solve test problems.
Begin cleaning up the application.yml files.
Begin setting up the logging system.

Fix a bug where non-static logging is causing NULL pointer exceptions.

* fix active sprints cache test assert argument order

* fix product stats cache test assert argument order

* fix remote projects cache test assert argument order

* fix internal request controller test assert argument order

* Update SugarServiceTest.

* Fix unit tests for VersonOneService and fix bug in VersonOneService exposed by fixed unit tests.

There is an extra "1" being appended to nowhere when calling `restTemplate.exchange()` that is causes the tests to fail.
This likely affects the GithubService as well and that service should also be reviewed.

* fix product controller test

* fix remote project manager controller test

* fix product controller integration test

* fix card type mapping service test assert argument order

* fix status mapping service test assert argument order

* fix service type test assert argument order

* fix more test assert argument order

* fix even more test assert argument order

* fix last test assert argument order

* Update the versionone and github dependencies, fixing security issues.

* fix status controller test

* fix products stats cache controller integration tests

* fix remote projects stats cache controller integration test

* fix status controller and tests

* fix remote project manager repo test

* Fix unit tests for both Github Services and fix bug in AbstractGitHubService exposed by fixed unit tests.

There is an extra "1" being appended to nowhere when calling `restTemplate.exchange()` that is causes the tests to fail.

* use optional isPresent to maintain java 8 compatibility

* remove unnecessary annotation

* Fix github service tests (#155)

* Testing...

* Another test...

* Shouldn't really change anything should it?

* Trying newer mockito.

* Try without deepmock

* Remove all deep stubs

* Add back limited deep stubs.

* Without spring extension.

* fix github service tests

* instantiate test collections after stubbing

* downgrade github-api

* increment github-api version

* reorder setup again

* minor reorder of test properties

* replace deep stubs with more mocks

* remove redundant extensions

* use long primitive for mock value

* try doReturn stubbing

* doReturn long primitive

* remove unused import

* add byte buddy dependency back

* use string value of for repository get id stubbing

* try not using a constant

* reinitialize ids before each

* revert some changes

* trye surefire configuration parallel none

* disable fork reuse of maven surefire plugin

* Explicitly set default settings.

* try with return value

* try reflection for repository id

* Add some debugging data

* revert changes

* fix inconsistencies

* downgrade github-api

* add paged iterable import back

* remove debug lines

* upgrade github-api version again

* use latest bytebuddy dependencies

* use latest mockito

* try doReturn for getId

* return string for id

* try thenAnswer

* thenAnswer Long for getId

* try reflection and call real method

* try extraInterfaces

* try stubOnly

* trry init bytebuddy agent

* comment out and disable untestable code

* try reflection on ghobject

* move getId call real method to test

* add polymorphic method to avoid GHObject getId stubbing issue

* init mocks before each

* try without extension

* try waiting a long while

* wait a second before each

* reorder stubbing

* mock properties once

* stub once

* cleanup

* reorder stubbing

* replace GHObject removing WithBridgeMethods annotation from getId

* add findbugs annotation dependency

* replace deprecated asList

* use mockito extension and annotation

* move GHObject to tests and cleanup pom

Co-authored-by: Kevin Day <kday@library.tamu.edu>

Co-authored-by: Kevin Day <kday@library.tamu.edu>
ghost pushed a commit that referenced this pull request Aug 5, 2022
* Java 11 and Weaver upgrade wip

* add dockerfile

* update gihutb action

* update pom

* fix app user details test

* fix remote projects cache test

* fix products stats scheduled cache service test

* fix internal request controller test

* remove duplicate plugins

* fix get one endpoint

* remove unused imports

* Tech debt fixes (#156)

* Begin updating incompletely migrated code.

Fix easy to solve test problems.
Begin cleaning up the application.yml files.
Begin setting up the logging system.

Fix a bug where non-static logging is causing NULL pointer exceptions.

* fix active sprints cache test assert argument order

* fix product stats cache test assert argument order

* fix remote projects cache test assert argument order

* fix internal request controller test assert argument order

* Update SugarServiceTest.

* Fix unit tests for VersonOneService and fix bug in VersonOneService exposed by fixed unit tests.

There is an extra "1" being appended to nowhere when calling `restTemplate.exchange()` that is causes the tests to fail.
This likely affects the GithubService as well and that service should also be reviewed.

* fix product controller test

* fix remote project manager controller test

* fix product controller integration test

* fix card type mapping service test assert argument order

* fix status mapping service test assert argument order

* fix service type test assert argument order

* fix more test assert argument order

* fix even more test assert argument order

* fix last test assert argument order

* Update the versionone and github dependencies, fixing security issues.

* fix status controller test

* fix products stats cache controller integration tests

* fix remote projects stats cache controller integration test

* fix status controller and tests

* fix remote project manager repo test

* Fix unit tests for both Github Services and fix bug in AbstractGitHubService exposed by fixed unit tests.

There is an extra "1" being appended to nowhere when calling `restTemplate.exchange()` that is causes the tests to fail.

* use optional isPresent to maintain java 8 compatibility

* remove unnecessary annotation

* Fix github service tests (#155)

* Testing...

* Another test...

* Shouldn't really change anything should it?

* Trying newer mockito.

* Try without deepmock

* Remove all deep stubs

* Add back limited deep stubs.

* Without spring extension.

* fix github service tests

* instantiate test collections after stubbing

* downgrade github-api

* increment github-api version

* reorder setup again

* minor reorder of test properties

* replace deep stubs with more mocks

* remove redundant extensions

* use long primitive for mock value

* try doReturn stubbing

* doReturn long primitive

* remove unused import

* add byte buddy dependency back

* use string value of for repository get id stubbing

* try not using a constant

* reinitialize ids before each

* revert some changes

* trye surefire configuration parallel none

* disable fork reuse of maven surefire plugin

* Explicitly set default settings.

* try with return value

* try reflection for repository id

* Add some debugging data

* revert changes

* fix inconsistencies

* downgrade github-api

* add paged iterable import back

* remove debug lines

* upgrade github-api version again

* use latest bytebuddy dependencies

* use latest mockito

* try doReturn for getId

* return string for id

* try thenAnswer

* thenAnswer Long for getId

* try reflection and call real method

* try extraInterfaces

* try stubOnly

* trry init bytebuddy agent

* comment out and disable untestable code

* try reflection on ghobject

* move getId call real method to test

* add polymorphic method to avoid GHObject getId stubbing issue

* init mocks before each

* try without extension

* try waiting a long while

* wait a second before each

* reorder stubbing

* mock properties once

* stub once

* cleanup

* reorder stubbing

* replace GHObject removing WithBridgeMethods annotation from getId

* add findbugs annotation dependency

* replace deprecated asList

* use mockito extension and annotation

* move GHObject to tests and cleanup pom

Co-authored-by: Kevin Day <kday@library.tamu.edu>

Co-authored-by: Kevin Day <kday@library.tamu.edu>

* move mock to correct resource directory

Co-authored-by: Ryan Laddusaw <rladdusaw@library.tamu.edu>
Co-authored-by: Kevin Day <kday@library.tamu.edu>
This pull request was closed.
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.

None yet

1 participant