Skip to content

Commit

Permalink
fix(bakery): fix bakery select by baseOs (#3253)
Browse files Browse the repository at this point in the history
  • Loading branch information
asher committed Oct 24, 2019
1 parent 4d290d0 commit 22b6adf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ interface SelectableFields {

// Allows to shard the bakery based on common bake stage fields
List<String> contextFields =
Arrays.asList("cloudProvider", "region", "baseOS", "cloudProviderType");
Arrays.asList("cloudProvider", "region", "baseOs", "cloudProviderType");
}

interface ConfigFields {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class BakerySelectorSpec extends Specification {
config: [:],
parameters: [
new Parameter(name: "region", values: ["us-east-1"]),
new Parameter(name: "baseOs", values: ["centos"]),
new Parameter(name: "cloudProviderType", values: ["aws"])
]
),
Expand Down Expand Up @@ -97,7 +98,7 @@ class BakerySelectorSpec extends Specification {
where:
ctx | user || service
[region: "us-east-1"] | "user@netflix.com" || new TestBakeryService(url: "http://bakery.com")
[region: "us-east-1", cloudProviderType: "aws", selectBakery: true] | "user@netflix.com" || new TestBakeryService(url: "http://rosco.us-east-1.com")
[region: "us-east-1", cloudProviderType: "aws", selectBakery: true, baseOs: "centos"] | "user@netflix.com" || new TestBakeryService(url: "http://rosco.us-east-1.com")
[region: "eu-west-1", selectBakery: true] | "test@netflix.com" || new TestBakeryService(url: "http://bakery.com")
[selectBakery: true] | "bob@netflix.com" || new TestBakeryService(url: "http://rosco.eu-west-1.com")
[selectBakery: false] | "bob@netflix.com" || new TestBakeryService(url: "http://bakery.com")
Expand Down

0 comments on commit 22b6adf

Please sign in to comment.