(kind string, module buildpack.BuildModule, source, expectedID, expectedVersion string)
| 431 | } |
| 432 | |
| 433 | func validateModule(kind string, module buildpack.BuildModule, source, expectedID, expectedVersion string) error { |
| 434 | info := module.Descriptor().Info() |
| 435 | if expectedID != "" && info.ID != expectedID { |
| 436 | return fmt.Errorf( |
| 437 | "%s from URI %s has ID %s which does not match ID %s from builder config", |
| 438 | kind, |
| 439 | style.Symbol(source), |
| 440 | style.Symbol(info.ID), |
| 441 | style.Symbol(expectedID), |
| 442 | ) |
| 443 | } |
| 444 | |
| 445 | if expectedVersion != "" && info.Version != expectedVersion { |
| 446 | return fmt.Errorf( |
| 447 | "%s from URI %s has version %s which does not match version %s from builder config", |
| 448 | kind, |
| 449 | style.Symbol(source), |
| 450 | style.Symbol(info.Version), |
| 451 | style.Symbol(expectedVersion), |
| 452 | ) |
| 453 | } |
| 454 | |
| 455 | return nil |
| 456 | } |
| 457 | |
| 458 | func (c *Client) uriFromLifecycleVersion(version semver.Version, os string, architecture string) string { |
| 459 | arch := "x86-64" |
no test coverage detected