(chain *chain, env map[string]interface{}, key string)
| 518 | } |
| 519 | |
| 520 | func envValue(chain *chain, env map[string]interface{}, key string) (interface{}, bool) { |
| 521 | v, ok := env[key] |
| 522 | |
| 523 | if !ok { |
| 524 | chain.fail(AssertionFailure{ |
| 525 | Type: AssertContainsKey, |
| 526 | Actual: &AssertionValue{env}, |
| 527 | Expected: &AssertionValue{key}, |
| 528 | Errors: []error{ |
| 529 | errors.New("expected: environment contains key"), |
| 530 | }, |
| 531 | }) |
| 532 | return nil, false |
| 533 | } |
| 534 | |
| 535 | return v, true |
| 536 | } |
no test coverage detected
searching dependent graphs…