Skip to content
Snippets Groups Projects
Commit bdcd70a3 authored by Andrew Crump's avatar Andrew Crump
Browse files

set-label: Backfill test when unrecognized resource is specified


[#164992453]

Co-authored-by: default avatarAndy Brown <anbrown@pivotal.io>
parent c7c2c923
No related branches found
No related tags found
No related merge requests found
......@@ -326,4 +326,32 @@ var _ = Describe("set-label command", func() {
})
})
})
When("an unrecognized resource is specified", func() {
BeforeEach(func() {
testUI = ui.NewTestUI(nil, NewBuffer(), NewBuffer())
fakeActor = new(v7fakes.FakeSetLabelActor)
fakeConfig = new(commandfakes.FakeConfig)
fakeSharedActor = new(commandfakes.FakeSharedActor)
resourceName = "some-unrecognized-resource"
cmd = SetLabelCommand{
Actor: fakeActor,
UI: testUI,
Config: fakeConfig,
SharedActor: fakeSharedActor,
}
cmd.RequiredArgs = flag.SetLabelArgs{
ResourceType: "unrecognized-resource",
ResourceName: resourceName,
}
})
JustBeforeEach(func() {
executeErr = cmd.Execute(nil)
})
It("errors", func() {
Expect(executeErr).To(MatchError("Unsupported resource type of unrecognized-resource"))
})
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment