Feature: `osc token` command
Scenario: Run `osc token` with no arguments
When I execute osc with args "token"
Then stdout is
"""
"""
Scenario: Run `osc token --operation rebuild`
When I execute osc with args "token --create --operation rebuild test:factory test-pkgA"
Then stdout matches
"""
Create a new token
Ok
.*
1
"""
Given I execute osc with args "token"
And stdout matches
"""
"""
And I search 'string="(?P[^"]+)' in stdout and store named groups in 'tokens'
When I execute osc with args "token --trigger {context.tokens[0][token]}"
Then stdout is
"""
Trigger token
Ok
"""