Skip to content

Commit

Permalink
connectivity test: Fix detectFeatures() logic
Browse files Browse the repository at this point in the history
f5ac977 unintentionally changed the detectFeatures logic by calling
ExtractFromConfigMap() and ExtractFromNodes() on ct.Features instead of
the features variable declared at the beginning of the loop [^1].

Fixes: f5ac977 ("Refactor extractFeaturesFromConfigMap()")

[^1]: https://github.com/cilium/cilium-cli/blob/f5ac9776fb217d883edc9f916cb61cb916576693/connectivity/check/features.go#L518

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent committed Oct 6, 2023
1 parent b452b1f commit 7115841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connectivity/check/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ func (ct *ConnectivityTest) detectFeatures(ctx context.Context) error {
// If unsure from which source to retrieve the information from,
// prefer "CiliumStatus" over "ConfigMap" over "RuntimeConfig".
// See the corresponding functions for more information.
ct.Features.ExtractFromConfigMap(ct.CiliumVersion, cm)
features.ExtractFromConfigMap(ct.CiliumVersion, cm)
err = ct.extractFeaturesFromRuntimeConfig(ctx, ciliumPod, features)
if err != nil {
return err
}
ct.Features.ExtractFromNodes(ct.nodesWithoutCilium)
features.ExtractFromNodes(ct.nodesWithoutCilium)
err = ct.extractFeaturesFromCiliumStatus(ctx, ciliumPod, features)
if err != nil {
return err
Expand Down

0 comments on commit 7115841

Please sign in to comment.