Skip to content

Commit

Permalink
boskos: add a unit test for changing the type of a static resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ixdy committed Jan 28, 2020
1 parent 761c11f commit d6714a6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions boskos/ranch/ranch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,23 @@ func TestSyncResources(t *testing.T) {
},
},
},
{
name: "change type of static resource",
currentRes: []common.Resource{
common.NewResource("res-1", "oldtype", "", "", startTime),
},
config: &common.BoskosConfig{
Resources: []common.ResourceEntry{
{
Type: "newtype",
Names: []string{"res-1"},
},
},
},
expectedRes: []common.Resource{
common.NewResource("res-1", "newtype", common.Free, "", startTime),
},
},
{
name: "should not change anything",
currentRes: []common.Resource{
Expand Down

0 comments on commit d6714a6

Please sign in to comment.