forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EvictionStrategy can be set at cluster level. When it is `LiveMigrate` and a vmi which is not live migratable is started, a warning event is emitted. This warning can cause the failure of the test because the utility function that wait for the vmi to start, generally, does not tolerate any warning. Set the specific warning in the warning ignore list when we detect that the cluster level eviction strategy is `LiveMigrate`. Signed-off-by: fossedihelm <[email protected]>
- Loading branch information
1 parent
f7e7f60
commit f6853e4
Showing
6 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package testsuite | ||
|
||
import ( | ||
v1 "kubevirt.io/api/core/v1" | ||
) | ||
|
||
var ( | ||
TestRunConfiguration RunConfiguration | ||
) | ||
|
||
type RunConfiguration struct { | ||
WarningToIgnoreList []string | ||
} | ||
|
||
func InitRunConfiguration() { | ||
runConfig := RunConfiguration{} | ||
if KubeVirtDefaultConfig.EvictionStrategy != nil && | ||
*KubeVirtDefaultConfig.EvictionStrategy == v1.EvictionStrategyLiveMigrate { | ||
runConfig.WarningToIgnoreList = append(runConfig.WarningToIgnoreList, "EvictionStrategy is set but vmi is not migratable") | ||
} | ||
|
||
TestRunConfiguration = runConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters