istio / old_mixer_repo

Deprecated home of Istio's Mixer and its adapters, now in istio/istio's mixer dir
https://github.com/istio/istio/tree/master/mixer
Apache License 2.0
67 stars 93 forks source link

Test that we no more panic because of nil evaluation on empty string. #1541

Closed guptasu closed 7 years ago

guptasu commented 7 years ago

Test the Mixer's behavior when attribute is absent at runtime and evaluated expr is empty string "".

Generated code was causing a panic because expression Eval was return nil in case of empty string. This is now fixed with pending pr/1523, which I have applied to this PR). Therefore, please ignore all the changes under pkg/il as they are reviewed inside a separate pr 1523. In this PR I am just adding a test to ensuring we have a test for the panic reported by users.

Release note: NONE


This change is Reviewable

istio-testing commented 7 years ago

@guptasu: Adding do-not-merge/release-note-label-needed because the release note process has not been followed.

One of the following labels is required "release-note", "release-note-action-required", or "release-note-none". Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed. Instructions for interacting with me using PR comments are available [here](https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
codecov[bot] commented 7 years ago

Codecov Report

Merging #1541 into master will decrease coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1541      +/-   ##
==========================================
- Coverage   84.55%   84.52%   -0.04%     
==========================================
  Files         122      122              
  Lines       11999    11994       -5     
==========================================
- Hits        10146    10138       -8     
- Misses       1651     1654       +3     
  Partials      202      202
Impacted Files Coverage Δ
pkg/il/interpreter/result.go 100% <100%> (ø) :arrow_up:
tools/codegen/pkg/inventory/generator.go 65.62% <0%> (-6.25%) :arrow_down:
adapter/stackdriver/metric/bufferedClient.go 90% <0%> (-2.5%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5253b6b...3c27650. Read the comment docs.

geeknoid commented 7 years ago

/lgtm

geeknoid commented 7 years ago

This repo is no longer accepting PRs. Please resubmit this change to the istio/istio repo.

Thanks.