mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-11 03:59:49 +00:00
test: fixed various flaky tests (#1009)
- Removed test cases which required access to `/root` from the `pkg/util` package. - Fixed flaky `PodDisruptionBudget` test. - Fixed a typo in `PersistentVolumeClaim` test. Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
This commit is contained in:
@@ -423,11 +423,6 @@ func TestFileExists(t *testing.T) {
|
||||
filePath: "./util.go",
|
||||
isPresent: true,
|
||||
},
|
||||
{
|
||||
filePath: "/root/temp.go",
|
||||
isPresent: false,
|
||||
err: "permission denied",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
@@ -455,10 +450,6 @@ func TestEnsureDirExists(t *testing.T) {
|
||||
{
|
||||
dir: "./",
|
||||
},
|
||||
{
|
||||
dir: "/root/tmp/",
|
||||
err: "permission denied",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
Reference in New Issue
Block a user