File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,13 @@ var exampleDomainCmd = &cobra.Command{
1717 Short : "Example Domain" ,
1818 Long : `Example Domain` ,
1919 Run : func (cmd * cobra.Command , args []string ) {
20- fmt .Println (getExample [opslevel.DomainInput ]())
20+ fmt .Println (getExample2 (opslevel.DomainInput {
21+ Name : opslevel .RefOf ("example_name" ),
22+ Description : opslevel .RefOf ("example_description" ),
23+ OwnerId : opslevel .RefOf (opslevel .ID ("Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk" )),
24+ //Parent: opslevel.NewIdentifier("domain-alias"),
25+ Note : opslevel .RefOf ("example_note" ),
26+ }))
2127 },
2228}
2329
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ var exampleSystemCmd = &cobra.Command{
2222 Name : opslevel .RefOf ("example_name" ),
2323 Description : opslevel .RefOf ("example_description" ),
2424 OwnerId : opslevel .RefOf (opslevel .ID ("Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk" )),
25- // Parent: opslevel.NewIdentifier("domain-alias"),
26- Note : opslevel .RefOf ("example_note" ),
25+ Parent : opslevel .NewIdentifier ("domain-alias" ),
26+ Note : opslevel .RefOf ("example_note" ),
2727 }))
2828 },
2929}
Original file line number Diff line number Diff line change @@ -8,6 +8,15 @@ import (
88func TestDomainHappyPath (t * testing.T ) {
99 tc := CLITest {
1010 Steps : []Step {
11+ Example {
12+ Cmd : "example domain" ,
13+ Yaml : `
14+ description: example_description
15+ name: example_name
16+ note: example_note
17+ ownerId: Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk
18+ ` ,
19+ },
1120 Create {
1221 Cmd : "create domain" ,
1322 Input : `
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ description: example_description
1515name: example_name
1616note: example_note
1717ownerId: Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk
18+ parent:
19+ alias: domain-alias
1820` ,
1921 },
2022 Create {
You can’t perform that action at this time.
0 commit comments