Commit Graph

19 Commits

Author SHA1 Message Date
Kevin Klues
bc686ea27b Update TopologyManager.GetTopologyHints() to take pointers
Previously, this function was taking full Pod and Container objects
unnecessarily. This commit updates this so that they will take pointers
instead.
2020-02-03 17:13:28 +00:00
nolancon
5e23517ebf Use reflect.DeepEqual check in policy_test.go 2020-01-16 08:13:07 +00:00
nolancon
92eb7cd601 Update "Single NUMA hint generation" expected affinity to nil 2020-01-16 08:13:07 +00:00
nolancon
8b3f6e61a2 Move test case "Two providers, 1 with 2 hints, 1 with single
non-preferred hint matching" into specific policy tests
2020-01-16 08:13:07 +00:00
nolancon
681c42bfc2 Move test case "Two providers, 1 hint each, same mask, 1 preferred, 1
not 2/2" into specific policy tests
2020-01-16 08:13:07 +00:00
nolancon
a38a2562b2 Move test case "Two providers, 1 hint each, same mask, 1 preferred, 1
not 1/2" into specific policy test.
2020-01-16 08:13:07 +00:00
nolancon
f639da7637 Move test case "Two providers, 1 hint each, no common mask" into
specific policy tests.
2020-01-16 08:13:07 +00:00
nolancon
401a2bb285 Move test case "Single TopologyHint with Preferred as false and
NUMANodeAffinity as nil" into specific policy tests.
2020-01-16 08:13:06 +00:00
nolancon
6460ef6392 Move test case "Single TopologyHint with Preferred as true and
NUMANodeAffinity as nil" into specific policy tests.
2020-01-16 08:13:06 +00:00
nolancon
baeff9ec5d Move test case "HintProvider returns empty non-nil map[string][]TopologyHint from
provider" into specific policy tests.
2020-01-16 08:13:06 +00:00
nolancon
599217d482 Move test case "HintProvider returns -nil map[string][]TopologyHint from provider" into specific policy tests 2020-01-16 08:13:06 +00:00
nolancon
57661ee946 Move test case 'HintProvider returns empty non-nil map[string][]TopologyHint' into specific policy tests. 2020-01-16 08:13:06 +00:00
nolancon
51f1af0395 Move test case 'TopologyHint not set' into individual policy tests 2020-01-16 08:13:06 +00:00
nolancon
8466a5852a Restore policy_test.go to upstream
Following commits will contain incremental changes to this file to ease
review process and ensure all tests are accounted for.
2020-01-16 08:13:06 +00:00
nolancon
59bb6c4d6f Update checks in mergeProvidersHints:
- Initialize best Hint to TopologyHint{}
- Update checks.
- Move generic unit test case into policy specific tests and updated
expected outcome to reflect changes.
2020-01-16 08:13:06 +00:00
nolancon
4cc5b9e46c Edit hints returned from policies and unit tests:
- Best Effort Policy: Return hint with nil affinity as opposed to
defaultAffinity when provider has no preference for NUMA affinty or no
possible NUMA affinities.
- Single NUMA Node Policy: Remove defaultHint from mergeProvidersHints.
Instead return appropriate TopologyHint where required.
- Update unit tests to reflect changes. Some test cases moved into
individual policy test functions due to differing returned affinties
per policy.
2020-01-16 08:13:05 +00:00
nolancon
b5ca4989e3 Update unit tests:
- Update filterHints test to reflect changes in previous commit.
- Some common test cases achieve differing expected results based on
policy due to independent merge strategies. These cases are moved into
individual policy based test functions.
2020-01-16 08:13:05 +00:00
Kevin Klues
b5f52e6072 Modularize TopologyManager policy Merge() tests
These changes make it so that a set of common test cases can be used for
all merge strategies, with specific test cases being able to be
specified on a policy-by-policy basis.
2019-11-04 18:43:07 +01:00
Kevin Klues
7ea1fc9be4 Move TopologyManager TestPolicyMerge() to shared test file 2019-11-04 18:43:07 +01:00