* test: added missing tests for the CronJob analyzer
- Fixed a small bug where pre-analysis was incorrectly appended to the
results every time at the end of the for loop. This caused the result
for a single cronjob failure to be appended multiple times in the
final results.
- Added missing test cases to ensure proper testing of the CronJob
analyzer. The addition of these missing test cases has increased the
code coverage of this analyzer to over 96%.
Partially Addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
* test: removed failure strings matching from tests
It is possible that the error or failure strings might change in the
future, causing the tests to fail. This commit addresses that issue by
removing the matching of failure text from various analyzer tests.
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
---------
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
* Added new tests for the `Service` analyzer defined in the
`pkg/analyzer` package.
* The addition of these new tests has increased the code coverage of the
service.go file to over 97%.
* Additionally addressed some flaky tests related to the `ReplicaSet`and
`PersisentVolumeClaim` analyzers.
Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
* chore: analyzer and ai interfacing
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: backend variable for aiProvider in cmd
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: changed folders for analyzers
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* chore: renamed analyzers
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: fixed ingress tests after rebase
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: fixed ingress tests after rebase
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
---------
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>