Skip to content

Commit bebfe70

Browse files
committed
more tweaks
1 parent b7fee17 commit bebfe70

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

src/cmd/domain.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/cmd/system.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

src/e2e/domain_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ import (
88
func 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: `

src/e2e/system_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ description: example_description
1515
name: example_name
1616
note: example_note
1717
ownerId: Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk
18+
parent:
19+
alias: domain-alias
1820
`,
1921
},
2022
Create{

0 commit comments

Comments
 (0)